Key Up Animation

Non-platform specific questions.

Key Up Animation

Postby Romol » Sun Sep 13, 2009 8:49 am

I need a script that: for example: performing an action replaces the character animation. that is, if you left animations charLeft.png after it should be Charleft2.png. I mean Key UP :roll:
User avatar
Romol
 
Posts: 35
Joined: Mon Feb 09, 2009 11:41 am
Location: Russia
Score: 3 Give a positive score

Re: Key Up Animation

Postby skydereign » Sun Sep 13, 2009 10:12 am

Kind of vauge, if these explanations weren't what you wanted, can you be more specific? Maybe if you gave an example within a game, because I don't see a reason for what you are doing, since gameEditor already has multiple file image animations.

Assuming that is not what you are talking about, you can do it several ways, here is one. You can use animpos, so a single image, and upon the key up, you have this code.
Code: Select all
animpos++;

Note that the animation direction should be stopped.

A direct version, using your example, this code would be on the key up of UP.
Code: Select all
if(strcpy("charLeft", getAnimName(animindex))==0)
{
    ChangeAnimation("Event Actor", "Charleft2", STOPPED);
}
User avatar
skydereign
 
Posts: 3510
Joined: Mon Jul 28, 2008 8:29 am
Score: 589 Give a positive score

Re: Key Up Animation

Postby Romol » Sun Sep 13, 2009 12:33 pm

For more specific ... I need to change not just the animation and the animation is executed when moving object. Suppose we go in the region and now running the character animation is not CharRight and replaced by CharRight2. I tried the above help, something did not work.
User avatar
Romol
 
Posts: 35
Joined: Mon Feb 09, 2009 11:41 am
Location: Russia
Score: 3 Give a positive score


Return to General

Who is online

Users browsing this forum: No registered users and 1 guest

cron