| View previous topic :: View next topic   | 
	
	
	
		| Author | 
		Message | 
	
	
		Jjkaybomb Brunettes have more hair
 
 
  
  Joined: 04 Sep 2003 Posts: 267 Location: Hunting with the mouse
  | 
		
			
				 Posted: Wed Sep 15, 2004 5:31 pm    Post subject: Smooth motion | 
				     | 
			 
			
				
  | 
			 
			
				I'm getting some weird stuff when I try to make things walk backwards. Am I just supposed to do it in a diferent order? Example: I do "set hero direction" in the direction they already are and do "walk hero..." but when I play the game under that plotscript they just get frozen in place. _________________ A man once said to the Universe "Sir! I exist!"
 
"However," replied the Universe, "This does not create in me a sense of obigation."
 
   ~Stephen Crane | 
			 
		  | 
	
	
		| Back to top | 
		 | 
	
	
		  | 
	
	
		Mad Cacti Guest
 
 
 
 
 
 
  | 
		
			
				 Posted: Wed Sep 15, 2004 5:47 pm    Post subject:  | 
				     | 
			 
			
				
  | 
			 
			
				You can't make npcs/heros walk backwards in this fashion, but I'm surprised that they get frozen.
 
 
You'd have to create a oop using put hero and set hero frame to achieve this, I think. | 
			 
		  | 
	
	
		| Back to top | 
		 | 
	
	
		  | 
	
	
		Uncommon His legend will never die
 
 
  
  Joined: 10 Mar 2003 Posts: 2503
 
  | 
		
			
				 Posted: Wed Sep 15, 2004 5:48 pm    Post subject:  | 
				     | 
			 
			
				
  | 
			 
			
				Try this, changing the arguments to fit your needs.
 
 
 	  | Code: | 	 		  walk hero (0,left,1)
 
set hero direction (0,right)
 
wait for hero (0) | 	 
  | 
			 
		  | 
	
	
		| Back to top | 
		 | 
	
	
		  | 
	
	
		JSH357
 
 
  
  Joined: 02 Feb 2003 Posts: 1705
 
  | 
		
			
				 Posted: Wed Sep 15, 2004 5:56 pm    Post subject:  | 
				     | 
			 
			
				
  | 
			 
			
				You can do all that, or:
 
 
Make a new hero walkabout set.
 
Flip the images backwards.
 
use setheropicture() to change the walkabout
 
Walk in the desired direction
 
change the hero picture back and set hero direction correctly
 
 
Just a suggestion | 
			 
		  | 
	
	
		| Back to top | 
		 | 
	
	
		  | 
	
	
		Flamer The last guy on earth...
 
 
  
  Joined: 04 Feb 2003 Posts: 725 Location: New Zealand (newly discovered)
  | 
		
			
				 Posted: Wed Sep 15, 2004 11:43 pm    Post subject:  | 
				     | 
			 
			
				
  | 
			 
			
				 	  | JSH357 wrote: | 	 		  You can do all that, or:
 
 
Make a new hero walkabout set.
 
Flip the images backwards.
 
use setheropicture() to change the walkabout
 
Walk in the desired direction
 
change the hero picture back and set hero direction correctly
 
 
Just a suggestion | 	  
 
why make a whole walkabout set?
 
If I did that in GameDesign101, there would be about 100 walkabout sets right now... as opposed to the 35 I've made and improvised with plotscripting commands.
 
 
 
I'd go with Uncommon's method of telling the NPC to move, then changing the NPC's direction, since the NPC's direction doesn't change back while it's walking. and it saves the hassle of scrolling through all these copies of the same walkabout. _________________ If we were a pack of dogs, IM would be a grand Hound, CN would be a very ficious little pitball, and Giz...well, it doesn't matter breed he is, he'd still be a bitch  
 
(no offense to anyone that was mentioned) | 
			 
		  | 
	
	
		| Back to top | 
		 | 
	
	
		  | 
	
	
		JSH357
 
 
  
  Joined: 02 Feb 2003 Posts: 1705
 
  | 
		
			
				 Posted: Thu Sep 16, 2004 8:35 am    Post subject:  | 
				     | 
			 
			
				
  | 
			 
			
				| Flamer: If you're only using the script once throughout the entire game, it makes perfect sense to use.  What's it gonna increase the filesize by? 1 byte? | 
			 
		  | 
	
	
		| Back to top | 
		 | 
	
	
		  | 
	
	
		Flamer The last guy on earth...
 
 
  
  Joined: 04 Feb 2003 Posts: 725 Location: New Zealand (newly discovered)
  | 
		
			
				 Posted: Fri Sep 17, 2004 12:05 am    Post subject:  | 
				     | 
			 
			
				
  | 
			 
			
				well, since you're controlling the NPC/hero, it'd save memory and hassle from changing picture sets _________________ If we were a pack of dogs, IM would be a grand Hound, CN would be a very ficious little pitball, and Giz...well, it doesn't matter breed he is, he'd still be a bitch  
 
(no offense to anyone that was mentioned) | 
			 
		  | 
	
	
		| Back to top | 
		 | 
	
	
		  | 
	
	
		JSH357
 
 
  
  Joined: 02 Feb 2003 Posts: 1705
 
  | 
		
			
				 Posted: Fri Sep 17, 2004 3:00 am    Post subject:  | 
				     | 
			 
			
				
  | 
			 
			
				You programmers never give up, I swear.
 
 
Let us normal people have our easy ways out. | 
			 
		  | 
	
	
		| Back to top | 
		 | 
	
	
		  | 
	
	
		junahu Custom Title: 45 character limit
 
 
  
  Joined: 13 Jan 2004 Posts: 369 Location: Hull, England
  | 
		
			
				 Posted: Fri Sep 17, 2004 3:12 am    Post subject:  | 
				     | 
			 
			
				
  | 
			 
			
				Just changing the hero's direction usually results in the hero 'sliding' from tile to tile which can be irritating and sometimes doesn't look right. _________________
   | 
			 
		  | 
	
	
		| Back to top | 
		 | 
	
	
		  | 
	
	
		Ysoft_Entertainment VB Programmer
 
 
  
  Joined: 23 Sep 2003 Posts: 810 Location: Wherever There is a good game.
  | 
		
			
				 Posted: Sat Sep 18, 2004 7:44 pm    Post subject:  | 
				     | 
			 
			
				
  | 
			 
			
				 	  | JSH357 wrote: | 	 		  | Flamer: If you're only using the script once throughout the entire game, it makes perfect sense to use.  What's it gonna increase the filesize by? 1 byte? | 	  
 
 
each walkabout graphic takes about 1600 bytes,
 
hero graphics 5120 bytes
 
attack graphics 3750 bytes
 
weapon graphics 576 bytes
 
small enemy graphics 578 bytes
 
medium enemy graphics 1250 bytes
 
large enemy graphics 3200 bytes
 
 
tilesets and backdrops, 64 k each
 
 
correct me if I am wrong.
 
 
thats totally off topic, 
 
 
now for the topic, I would go with uncommon's idea, its saves time, and less complecated. _________________ Try my OHR exporter/importer.
 
OHRGFX
 
Striving to become better pixel artist then Fenrir Lunaris.  Unfortunately the laziness gets in the way of my goals. | 
			 
		  | 
	
	
		| Back to top | 
		 | 
	
	
		  | 
	
	
		no_shot Surpasses you in poetical prowess
 
 
  
  Joined: 28 Apr 2003 Posts: 300 Location: On the road to perfection.
  | 
		
			
				 Posted: Tue Jan 11, 2005 7:15 pm    Post subject:  | 
				     | 
			 
			
				
  | 
			 
			
				Try something like this.script, walkbackwards, begin suspend player variable (i) variable (j) variable (f) f:=0 for (i, 1, 5, 1) do, begin   for (j, 1, 4, 1) do, begin     put hero(me, (hero pixel x--j), hero pixel y) #might have to modify these depending on where you want the hero to move...     wait (5)   end   if (f==1) then, f:=0 else, f:=1   set hero frame (me, f) end resume player end 
  _________________ Play Horrible Fantasy NOW! | 
			 
		  | 
	
	
		| Back to top | 
		 | 
	
	
		  | 
	
	
		TMC On the Verge of Insanity
 
 
 
  Joined: 05 Apr 2003 Posts: 3240 Location: Matakana
  | 
		
			
				 Posted: Tue Jan 11, 2005 10:46 pm    Post subject:  | 
				     | 
			 
			
				
  | 
			 
			
				Whoops.
 
 	  | Code: | 	 		  
 
script, walkbackwards, begin
 
  suspend player
 
  variable (i)
 
  variable (f)
 
  f := 0
 
  for (i, 1, 5, 1) do, begin
 
    put hero(me, (hero pixel x--4), hero pixel y) 
 
    f := f,xor,1
 
    set hero frame (me, f)
 
    wait (1)
 
  end
 
  resume player
 
end
 
 | 	  
 
Walks to left, regardless of direction facing.
 
But not that this script wopuld let you walk backwards through walls and npcs, so only use where this can't happen. _________________ "It is so great it is insanely great." | 
			 
		  | 
	
	
		| Back to top | 
		 | 
	
	
		  | 
	
	
		Bob the Hamster OHRRPGCE Developer
 
 
  
  Joined: 22 Feb 2003 Posts: 2526 Location: Hamster Republic (Southern California Enclave)
  | 
		
			
				 Posted: Fri Jan 14, 2005 4:20 pm    Post subject: walking backwards | 
				     | 
			 
			
				
  | 
			 
			
				As uncommon correctlys suggested, you should do:
 
 
 	  | Code: | 	 		  
 
walk hero (0,left,1)
 
set hero direction (0,right)
 
wait for hero (0)
 
 | 	  
 
 
If this does not work, you have found a bug and should report it on bugzilla | 
			 
		  | 
	
	
		| Back to top | 
		 | 
	
	
		  | 
	
	
		 |