newbie animation question

Get help using Construct 2

Post » Thu Jan 26, 2012 7:09 pm

The documentation seems lacking in terms of controlling animation, or maybe I just haven't found the right page. At the moment I'm trying to do something very simple. I have four on screen buttons, each of them should play a different animation on a single sprite.

Right now I have the animations broken up into four different sequences in the animation editor. When I go to the event editor (and this is where I'm finding no documentation) I first SET the animation to LoopName.AnimationName - then set animation frame to 0 then start animation from beginning. This works fine for the first button and the first loop. I can't for the life of me figure out how to get the second loop to work - I tried making a second event on the second button that's identical except that it's LoopName2.AnimationName...

Any ideas? Any documentation?

Also - the first loop seems to play when I open the file - not sure how to get my sprite to just sit there and not animate... thanks for any help
B
4
Posts: 13
Reputation: 576

Post » Thu Jan 26, 2012 8:04 pm

In the properties for animation at the top left when you are in edit mode you can set it to Loop.

B
16
S
2
G
5
Posts: 30
Reputation: 3,925

Post » Thu Jan 26, 2012 8:06 pm

You don't need to do all that, When you edit your animation you already have a bunch of properties in the property panel (click on the name of an animation you'll see)

You can set a default speed and some looping properties.
So basically you just need to
[code]+Button: on clicked
-> Set animation to "what you want" (start from begining)[/code]
It should play the animation you set and loop it if you set this animation to loop in properties
B
60
S
22
G
14
Posts: 1,479
Reputation: 16,346

Post » Thu Jan 26, 2012 8:23 pm

It basically sort of works - the problem is I can't set the animation to what I want. I'm trying to click on one sprite to play an animation on another sprite - and when I try to set the name of the animation it says 'this is not a variable name in the scope' - so - I can't trigger animation on one sprite from another? Is there a workaround?

Thanks for the help!

I'm trying to turn this site into html5:

www.poopfriends.com
B
4
Posts: 13
Reputation: 576

Post » Thu Jan 26, 2012 8:47 pm

Ok - it took me three hours to figure out I need "quotes" around the animation name - meh... thanks for the help
B
4
Posts: 13
Reputation: 576


Return to How do I....?

Who is online

Users browsing this forum: Artpunk, Braus, Kagubro, Mirlas, zeneizel and 20 guests