Animation wont run on event

Discussion and feedback on Construct 2

Post » Sun Sep 04, 2011 1:48 am

lol .. double post action :D

ive stopped all effect animations in the Event "System -> On start of layout" (not shown on the screenshots).. but it does not worked too..

[EDITH says:]

ive tried it again.. Stopped Anim at the "on start of layout" event..

and start the animation inside the "mouse over" event..
(Start Animation from the beginning... and the 2nd test "Set animation to "effectAnim" (start from the beginning)

now the animation starts if i leave the event trigger area (so the mouse over evnt isnt triggered anymore)
and if i trigger the "mouse over" again.. the anim stops ..
weired.. -.-Luzius2011-09-04 01:52:22
B
5
G
2
Posts: 14
Reputation: 1,229

Post » Sun Sep 04, 2011 1:51 am

'Mouse is over object' runs every tick (about 60 times per second) while the condition is true.

If in the event you start the animation from beginning, then every single tick while the mouse is over the object, it is rewinding the animation back to the first frame. So it never gets the chance to go to the second frame or beyond.

Try adding a 'trigger once' condition after the 'mouse is over object' condition.
Scirra Founder
B
359
S
214
G
72
Posts: 22,952
Reputation: 178,630

Post » Sun Sep 04, 2011 1:58 am

Ure my hero :)

now the 2nd animation works without problems.. thx man :)
B
5
G
2
Posts: 14
Reputation: 1,229

Post » Sun Sep 04, 2011 2:03 am

That's strange Ashley. I just double checked my project and it always plays the animations as they are - from beginning to the end - with "Mouse is over object". When i move mouse over sprite it starts the animation and plays it once from first frame to the last one (if loop is set to No) and repeats entire animation sequence if loop is set to Yes.

Never had that situation with "Mouse is over object" and rewinding the animation back to the first frame.
ImageImageImageImage
B
140
S
58
G
36
Posts: 2,547
Reputation: 31,170

Post » Sun Sep 04, 2011 2:07 am

Do you have other conditions in the event or did you set 'play from current frame'? If so, it won't be rewinding every tick.
Scirra Founder
B
359
S
214
G
72
Posts: 22,952
Reputation: 178,630

Post » Sun Sep 04, 2011 2:11 am

One sprite, mouse object and one event

+Mouse: Cursor is over "Door"
-> Door: Set animation to "Open" (play from beginning"
ImageImageImageImage
B
140
S
58
G
36
Posts: 2,547
Reputation: 31,170

Post » Sun Sep 04, 2011 10:03 pm

Oh, I just remembered, 'set animation' is ignored if you set the animation that is already playing. So that will work, but a 'play animation from beginning' action will always rewind.
Scirra Founder
B
359
S
214
G
72
Posts: 22,952
Reputation: 178,630

Previous

Return to Construct 2 General

Who is online

Users browsing this forum: No registered users and 6 guests