right or left

Non-platform specific questions.

right or left

Postby frodo » Mon May 01, 2006 4:17 pm

if I have an actor that follows my mouse, and a moving animation for right and left ho do I get the actor to change anim to right when going to the right, and vice-versa. this is my code:
if(-xvelocity>0)changle animation("left"...);
if(+xvelocity>0)changle animation("right"...);

this work accept the animation is stuck on frame 1, when the anim has to move from frame to frame.
User avatar
frodo
 
Posts: 127
Joined: Tue Mar 21, 2006 6:53 pm
Location: universe
Score: 2 Give a positive score

Postby makslane » Mon May 01, 2006 4:41 pm

Make sure use the FORWARD option:

ChangeAnimation("Event Actor", "left", FORWARD);
makslane
Site Admin
 
Posts: 3947
Joined: Sat Apr 05, 2003 6:47 pm
Score: 182 Give a positive score

Postby The achievement » Mon May 01, 2006 6:25 pm

woudnt it be Directional_velocity variable if you are trying to do what you are doing?
User avatar
The achievement
 
Posts: 220
Joined: Sun Feb 12, 2006 11:01 pm
Location: United States,Massachusetts
Score: 0 Give a positive score

Postby frodo » Thu May 04, 2006 2:05 am

I am using Foward, and it still dosn't work.
User avatar
frodo
 
Posts: 127
Joined: Tue Mar 21, 2006 6:53 pm
Location: universe
Score: 2 Give a positive score

Postby makslane » Thu May 04, 2006 2:51 pm

Where are you putting this action?
If is in a 'Draw Actor' event, try use NO_CHANGE instead FORWARD
makslane
Site Admin
 
Posts: 3947
Joined: Sat Apr 05, 2003 6:47 pm
Score: 182 Give a positive score

Postby frodo » Thu May 04, 2006 3:00 pm

thanks a bunch, Makslane. it works great.
User avatar
frodo
 
Posts: 127
Joined: Tue Mar 21, 2006 6:53 pm
Location: universe
Score: 2 Give a positive score


Return to General

Who is online

Users browsing this forum: No registered users and 1 guest