"Animation is playing" event

For questions about using Classic.

Post » Mon Feb 18, 2008 8:25 am

..Doesn't seem to work for me.
I tried something simple to test it out like "Animation "Run" is playing - Destroy object" and the animation plays but it doesn't get destroyed.

Same thing with "On animation finished" events.

Maybe I'm doing something wrong? do I need to enter anything other than the animation name when prompted?
B
2
G
4
Posts: 44
Reputation: 1,138

Post » Mon Feb 18, 2008 8:36 am

Do you use "Default" animation for a event? If so it wont work, you must create new animation and then make an event.
B
4
S
2
G
4
Posts: 719
Reputation: 2,938

Post » Mon Feb 18, 2008 4:55 pm

Nope, I named each animation differently.
B
2
G
4
Posts: 44
Reputation: 1,138

Post » Mon Feb 18, 2008 5:07 pm

This is due to a bug with what animation construct thinks is playing. Go to the debugger when running your .cap - check what animation is playing. It always says 'animation'. I think I submitted this one to the tracker...

To work around, set a value to the animation name manually.
Moderator
B
88
S
32
G
33
Posts: 3,005
Reputation: 27,432

Post » Mon Feb 18, 2008 9:22 pm

[quote="Arima":f74h7lbr]This is due to a bug with what animation construct thinks is playing. Go to the debugger when running your .cap - check what animation is playing. It always says 'animation'. I think I submitted this one to the tracker...

To work around, set a value to the animation name manually.[/quote:f74h7lbr]

Could you give an example? I'm not sure how to assign it since it can't recognize what is playing.
B
2
G
4
Posts: 44
Reputation: 1,138

Post » Mon Feb 18, 2008 11:24 pm

Set up a private variable for the sprite via the properties such as 'animationname'. Then in the events, when you have the code to change an animation, also change the variable to the name of the animation manually, i.e. set sprite.Value('animationname') to "running".
Moderator
B
88
S
32
G
33
Posts: 3,005
Reputation: 27,432


Return to Help & Support using Construct Classic

Who is online

Users browsing this forum: No registered users and 4 guests