[TUTORIAL] Move an actor with animation

Non-platform specific questions.

[TUTORIAL] Move an actor with animation

Postby Masterburner » Mon Sep 04, 2006 8:40 pm

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 ..
Masterburner
 
Posts: 5
Joined: Mon Sep 04, 2006 4:17 pm
Score: 0 Give a positive score

Postby Novice » Mon Sep 04, 2006 9:40 pm

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.
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 » Mon Sep 04, 2006 9:47 pm

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.
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 Jokke » Tue Sep 05, 2006 2:43 pm

moonwalking? my character does that...and the animation dont animate at all when moving too really odd
Image
Jokke
 
Posts: 65
Joined: Sat Aug 26, 2006 11:53 am
Location: Yes
Score: 0 Give a positive score


Return to General

Who is online

Users browsing this forum: No registered users and 1 guest