Programming C, C++, Java, PHP, Ruby, Turing, VB
Computer Science Canada 
Programming C, C++, Java, PHP, Ruby, Turing, VB  

Username:   Password: 
 RegisterRegister   
 help with chrono sprite animation
Index -> Programming, Turing -> Turing Help
View previous topic Printable versionDownload TopicSubscribe to this topicPrivate MessagesRefresh page View next topic
Author Message
Schaef




PostPosted: Sat Mar 06, 2004 6:10 pm   Post subject: help with chrono sprite animation

here is a program that I have just started to work on. I have it so that you can walk around with chrono from the game chrono trigger and draw your sword while facing either left,right or down so far. I am trying to get it so that while he is standing still with his sword drawn he moves up and down kind of like he is breathing while hes standing there. I have attempted to do this while chrono is facing left with his sword drawn with a loop starting on line 193 of my program. I put "exit when chars(KEY_LEFT_ARROW)" in the loop but it doesnt stop the loop from going. Any ideas on how to fix this?


chrono animation.zip
 Description:
use the arrows to walk around. press ctrl to draw sword and walk again to put the sword back. Drawing the sword while facing left will stop you from being able to do anything b/c of the loop that i mentioned b4 but you can see what i am trying to do if

Download
 Filename:  chrono animation.zip
 Filesize:  33.93 KB
 Downloaded:  301 Time(s)

Sponsor
Sponsor
Sponsor
sponsor
Cervantes




PostPosted: Sat Mar 06, 2004 6:46 pm   Post subject: (No subject)

there are two problems: you don't have an Input.KeyDown (chars) inside that loop. Also, there is a big delay in there. You have to hit the key at the right time, or hold it down. Shouldn't be too hard to fix, though I don't know how atm. if all else fails, however, you can use fork Confused
AsianSensation




PostPosted: Sat Mar 06, 2004 6:46 pm   Post subject: (No subject)

when chrono is standing still, that's basicly telling me you are not currently pressing down on any keys. With Input.KeyDown, just draw something if you have a key pressed down, but if you didn't press anything, have him breathe. I would suggest keeping a counter of which breathing picture to draw, and once you have drawn it, increase the counter, so the next picture could be drawn. All this is done when no key is being pressed, and when he has a sword out (Im assuming you used a boolean flag for the sword/no sword)
Display posts from previous:   
   Index -> Programming, Turing -> Turing Help
View previous topic Tell A FriendPrintable versionDownload TopicSubscribe to this topicPrivate MessagesRefresh page View next topic

Page 1 of 1  [ 3 Posts ]
Jump to:   


Style:  
Search: