Sptite animation how?

Get help using Construct 2

Post » Sat Feb 15, 2014 10:00 pm

Hi,

I have read through some tut's but i still can't figure this out..LOL

I have added a sprite and given it "Platform" behaviour and added the other image variations such as walking right, left, jumping..etc as additional frames.

Now how on earth do i get my animation to run? Do i need to set up an event list?
B
7
S
2
Posts: 110
Reputation: 927

Post » Sat Feb 15, 2014 10:11 pm

Have a look at
https://www.scirra.com/tutorials/253/how-to-make-a-platform-game/page-1#tuttop

is contains quite a bit about animations
August 2015 - I misplaced a lot of links - I will try to find backups and repost. If You find a post that interests please reply to post with @rampackwobble and I will get a nudge!

If you find my posts useful please consider donating something to a local charity or to the http://www.mndassociation.org/
B
64
S
34
G
47
Posts: 1,194
Reputation: 30,892

Post » Sat Feb 15, 2014 10:13 pm

My mistake, i didn't have it set to loop and was missing the animation..LOL
B
7
S
2
Posts: 110
Reputation: 927

Post » Sat Feb 15, 2014 10:14 pm

First ensure all your movements are set to different animations

You can either add the "set animation" events to your control input events...

key left is down> move player left
                  "set animation" to "walk"


Or another way, is use an instance variable to set the animations...

name your animations as so

move0
move1
move2 ect ect

key left is down> move player
                  set variable to 1

key right is down> move player
                  set variable to 2

then a separate event

(every tick) set animation to "move"&<player variable>

should work...


As long as I can move left, right and fire, I'm Happy...
B
42
S
15
G
11
Posts: 655
Reputation: 12,270

Post » Sat Feb 15, 2014 10:15 pm

Hate when that happens...
As long as I can move left, right and fire, I'm Happy...
B
42
S
15
G
11
Posts: 655
Reputation: 12,270

Post » Sat Feb 15, 2014 10:32 pm

But how do you set the animation for each different direction?

I have my character running right by using the "Platform on moved" event as per the tutorial, but that just makes the same animation run no matter what direction i send the sprite!

Do i need to actually give my sprite obect (platform object) a 8 point control behaviour too?
mist2014-02-15 22:34:01
B
7
S
2
Posts: 110
Reputation: 927

Post » Sun Feb 16, 2014 7:38 am

[QUOTE=Pixel perfick] First ensure all your movements are set to different animations

[/QUOTE]

Sorry, but where do i set that up? I looked everywhere..LOL
B
7
S
2
Posts: 110
Reputation: 927

Post » Sun Feb 16, 2014 9:52 am

In the image editor, there is an animation bar on the right, here you can add, duplicate and rename animations...

Edit it may be hidden behind some other window...Pixel perfick2014-02-16 09:53:53
As long as I can move left, right and fire, I'm Happy...
B
42
S
15
G
11
Posts: 655
Reputation: 12,270

Post » Sun Feb 16, 2014 9:54 am

Hi,

I was cool with that bit, i wasn't sure where the keyboard object was..LOL
B
7
S
2
Posts: 110
Reputation: 927

Post » Sun Feb 16, 2014 9:58 am

So You sorted it?...<scratches head>
As long as I can move left, right and fire, I'm Happy...
B
42
S
15
G
11
Posts: 655
Reputation: 12,270

Next

Return to How do I....?

Who is online

Users browsing this forum: AkbarAsgharMG and 22 guests