The Daily Click ::. Forums ::. Klik Coding Help ::. Help with custom platforms
 

Post Reply  Post Oekaki 
 

Posted By Message

Ski

TDC is my stress ball

Registered
  13/03/2005
Points
  10130

GOTW WINNER CUP 1!GOTW WINNER CUP 2!GOTW WINNER CUP 3!KlikCast HelperVIP MemberWii OwnerStrawberryPicture Me This Round 28 Winner!PS3 OwnerI am an April Fool
Candy Cane
27th March, 2005 at 15:14:29 -

Hi guys, so ive been trying to learn how to do custom platform engines. So far Circy's tutorial has helped me and ive been able to program my charater to run when holding down a key. However! How on earth do i get the animations to stop and change?! would i set my character's animation to fall when he is at the peak of his jump? BAHH! its darn tricky, I want to post a preview of the game soon but i cant until ive sorted this blaster problem out! Help is appreciated!
cheers,
DD

 
n/a

clwe



Registered
  17/12/2002
Points
  702
27th March, 2005 at 16:50:51 -

Well, the best way of deciding when to show certain animations is by checking the movement counters and stuff. For example:

One action when event loops
X movement is equal to 0
Y movement is equal to 0
flag 0 is off
• Change animation to 'stopped'

One action when event loops
X movement is different to 0
Y movement is equal to 0
flag 0 is off
• Change animation to 'walking'

Upon presing fire 1 (initial jump event)
• Change animation to 'jumping'

One action when event loops
Y movement is greater than 0
flag 0 is on
• Change animation to 'falling'


Here, I've assumed that 'flag 0' is used to tell whether the character is jumping or not (OFF = no, ON = yes). I'm guessing you have something similar in your engine.

 
n/a

Ski

TDC is my stress ball

Registered
  13/03/2005
Points
  10130

GOTW WINNER CUP 1!GOTW WINNER CUP 2!GOTW WINNER CUP 3!KlikCast HelperVIP MemberWii OwnerStrawberryPicture Me This Round 28 Winner!PS3 OwnerI am an April Fool
Candy Cane
27th March, 2005 at 16:55:24 -

thanks clwe ill try that out, hopefully if it works, i should be able to put up a preview in a couple of days time!

 
n/a
   

Post Reply



 



Advertisement

Worth A Click