Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

AppGameKit Classic Chat / How can i change from walk to idle animation

Author
Message
sskethan
16
Years of Service
User Offline
Joined: 20th Sep 2008
Location: Oshawa, ON. Canada
Posted: 16th Nov 2012 17:30
Can someone please help? What do i need to do to change the animation from walk while moving to idle animations when stopped. The sprite sheet has 48 frames 1-24 walk and 25-48 idle. I think i need to change the stopsprite after the if ( mX# = 0.0 and mY# = 0.0 ), but if i try to playsprite here it only plays the idle animation.

DVader
20
Years of Service
User Offline
Joined: 28th Jan 2004
Location:
Posted: 17th Nov 2012 00:45
Just use playsprite ( 1, 35, 1, 25, 48 ) to get your idle anim to play. Perhaps you would be better off setting a flag (such as walk=1 or walk=0 etc) and animating dependant on the flag setting.

sskethan
16
Years of Service
User Offline
Joined: 20th Sep 2008
Location: Oshawa, ON. Canada
Posted: 24th Jan 2013 22:54
I have been trying to get the idle animation to work but i still can't seem to get it to work right. Can you please help show a small example. I'm not sure where to add in the playsprite ( 1, 35, 1, 25, 48 ).
easter bunny
12
Years of Service
User Offline
Joined: 20th Nov 2012
Playing: Dota 2
Posted: 25th Jan 2013 02:16
This is a small, uncompiled project that show's walking and stopping, I think it's what you want

Click the red download button at the bottom right of this post to download it.

There are 10 types of people, those who understand binary and those who don't

Attachments

Login to view attachments

Login to post a reply

Server time is: 2024-11-24 05:39:48
Your offset time is: 2024-11-24 05:39:48