Animation sequences?

Game Editor comments and discussion.

Animation sequences?

Postby Guardian69 » Fri Jun 10, 2011 5:27 pm

Hi guys,

I'm fairly new to GE and have come across something I want to do but cant find the information on how to do it.

I want to add a couple of animation sequences to an actor and switch to a different sequence in script on an event.

Ok, for example say I have one sequence that has 8 images representing the orientation of a top down ship, and I have another set of sequences for an idle animation.

How would I change the actor in script to use a different animation sequence? :?

Cheers,
Guardian
User avatar
Guardian69
 
Posts: 17
Joined: Thu May 26, 2011 9:05 pm
Location: United Kingdom
Score: 0 Give a positive score

Re: Animation sequences?

Postby Hblade » Fri Jun 10, 2011 5:33 pm

I would like to help but I'm not the best in this type of stuff, if your trying to get the actor to be able to fly in the angle that you go (if you go right he turns right and whatnot) then you would most likely base the animpos off of the angle, but it's really confusing sometimes :'(

talk to DST i'm sure he wouldn't mind helping.

Also try asking skydereign
Subscribe to my YouTube? - Yes| No
User avatar
Hblade
 
Posts: 4455
Joined: Fri Dec 08, 2006 11:14 pm
Score: 181 Give a positive score

Re: Animation sequences?

Postby Guardian69 » Fri Jun 10, 2011 5:47 pm

Nah, the direction stuff I have working fine.

I just want to know the script handle for how to switch to a different animation sequence.

i.e. You set up a sequence by going to actor control > Add sequence > and then specifying the frames that make up the sequence.
User avatar
Guardian69
 
Posts: 17
Joined: Thu May 26, 2011 9:05 pm
Location: United Kingdom
Score: 0 Give a positive score

Re: Animation sequences?

Postby jimmynewguy » Fri Jun 10, 2011 6:06 pm

do you meant change the animation?

Code: Select all
ChangeAnimation("Actor", "name_of_animation", FORWARD);


FORWARD makes the animation start over playing forward
BACKWARD same thing just backwards
STOPPED stop on first frame of animation (technically 0 in GE)
NO_CHANGE keep the direction the animation is in, (ie. FORWARDS, BACKWARDS, STOPPED) but if the current animation is the one you're changing to it won't restart the animation

so if you have all your directions down then when the ship is moving you could do something like:

Code: Select all
if(directional_velocity >= 1)// if we're moving
{
switch(dir)
{
case 0:ChangeAnimation("Event Actor", "fly_right", NO_CHANGE);//angle is 0 pi
break
case 1:ChangeAnimation("Event Actor", "fly_up", NO_CHANGE);//angle is pi/2
break;
//ect
}
}


is this what you mean? If not feel free to elaborate for more help
Working on a probably too ambitious project! Wild-west-adventure-RPG-shooter-thing.
User avatar
jimmynewguy
 
Posts: 1137
Joined: Sat Mar 31, 2007 6:27 pm
Score: 89 Give a positive score

Re: Animation sequences?

Postby Guardian69 » Sat Jun 11, 2011 3:22 pm

Thank you, I think that is what I need, I will give it a go.

In the meantime I have got another question . If add a new animation with images called player000, player001 and player002, should the animpos be 0, 1, 2 respectively? I have made a few animations and the animpos seems to be different for each.

Cheers,
Guardian
User avatar
Guardian69
 
Posts: 17
Joined: Thu May 26, 2011 9:05 pm
Location: United Kingdom
Score: 0 Give a positive score


Return to GE - General

Who is online

Users browsing this forum: No registered users and 1 guest