Page 1 of 1

[TUTORIAL] Move an actor with animation

PostPosted: Mon Sep 04, 2006 8:40 pm
by Masterburner
Ok I am new here but it dont mean that i am an Uber noob so i post a Tutorial for all Newbies how to tech the Actor Move with Animation.

Step 1

Create some GIFs where a player is moving Left,Right,and Stand Left Right
i post some

Player is moving Left
Image

Player is moving Right
Image


Player Stand Left
Image

Player Stand Right
Image


Step 2

Now Create an Actor
Image


Step 3

Now Right CLick on the Actor and open the Actor Control and Add animation
Image


Step 4

Add all 4 Animations
Image


Step 5

Then add a new Event "Key Down"
press "right"
then Add "action"
Image


Step 6

Now chose "Script Editor"
and write these " x=x+5;"
Image
Then Do the same for Left just use add the Event Key Down the key "Left"
and add in the script " x=x-5"


Now we can move with our Player Left and Right but the animations dont change!now We teach our Player to change Animatio.


Step 7

Press on "Edit"
then " Key Down"
then "Right...."

Image


Step 8

Now Click "Edit Action"
and the script Window should appear
Then Click on "Variables/Function"
Image



Step 9

Now click on "change Animation"
Image


Step 10

So were are going to change the player In the firs box select the "Player"
Becouse we are walking right select the "Orange muschrom Right" Animtion
In the third box select No change and press OK.

Image


Step 11

Now your code has been changed just press ok !
Image

Do the same for the left action and select the Orange mushrom left.


Step 12

Now open the Actor Controll add a new Event select "Key UP"
now press "right"
then "Add action"
Image


Step 13

Now you press "change Animation"
and select in the first Box the Player
in the second Box select "Orange Mushrom Stand Right"
Image
Now do the same for the Left one ..

PostPosted: Mon Sep 04, 2006 9:40 pm
by Novice
You should use a separate key down event ,with repeat disabled, for the change animation action because if you don't, your animation will be restarted each frame, by disabling repeat your animation will start only when the coresponding key is pressed.

BTW Nice tutorial.

PostPosted: Mon Sep 04, 2006 9:47 pm
by Game A Gogo
yes, that method is full of glichs (press two key and release one of them after and youl get it!) so irecomend using my demo in the demo page called micro cross platform.

PostPosted: Tue Sep 05, 2006 2:43 pm
by Jokke
moonwalking? my character does that...and the animation dont animate at all when moving too really odd