Changing animation on path.

Talk about making games.

Changing animation on path.

Postby Hyperyon » Wed Jul 05, 2006 2:44 pm

Is it possible for my player to change animations when turned right and left on a path?
Lets keep our dreams alive!
Hyperyon
 
Posts: 148
Joined: Sat Jun 24, 2006 1:29 pm
Score: 0 Give a positive score

Postby Game A Gogo » Thu Jul 06, 2006 1:07 am

use:
Code: Select all
animpos=angle*nframes/360;
Programming games is an art,
    Respect it.
User avatar
Game A Gogo
 
Posts: 3466
Joined: Wed Jun 29, 2005 10:49 pm
Location: French Canada *laughs*
Score: 181 Give a positive score

Postby Hyperyon » Thu Jul 06, 2006 7:34 am

Thanks. I'll get on that :P
Lets keep our dreams alive!
Hyperyon
 
Posts: 148
Joined: Sat Jun 24, 2006 1:29 pm
Score: 0 Give a positive score

Postby Hyperyon » Thu Jul 06, 2006 3:31 pm

Ok, I made a path for my actor then typed that code in script editor. Gave me no errors, however nothing happend:(
Lets keep our dreams alive!
Hyperyon
 
Posts: 148
Joined: Sat Jun 24, 2006 1:29 pm
Score: 0 Give a positive score

Postby Novice » Thu Jul 06, 2006 4:50 pm

Thats because that's not the right code, use:
Code: Select all
if (xvelocity>0) change animation("right")
else if (xvelocity<0) change animation("left")

WARNING this is pseudo code!!! :wink:
Why do i always get stuck?
User avatar
Novice
 
Posts: 399
Joined: Mon Aug 29, 2005 10:54 am
Location: Relative
Score: 5 Give a positive score

Postby Game A Gogo » Thu Jul 06, 2006 5:46 pm

i tought that all the animations was in one animation.
Programming games is an art,
    Respect it.
User avatar
Game A Gogo
 
Posts: 3466
Joined: Wed Jun 29, 2005 10:49 pm
Location: French Canada *laughs*
Score: 181 Give a positive score

Postby Hyperyon » Thu Jul 06, 2006 6:25 pm

Thanks alot guys! I'll built monuments in youre honor! :D
Lets keep our dreams alive!
Hyperyon
 
Posts: 148
Joined: Sat Jun 24, 2006 1:29 pm
Score: 0 Give a positive score


Return to Game Development

Who is online

Users browsing this forum: No registered users and 1 guest

cron