On animation "xxx" finished not respected?

Get help using Construct 2

Post » Thu Dec 04, 2014 3:56 pm

Are there cases where On Animation "xxx" Finished could not be triggered despite that I verified the animation has been started?

I am having problems with that maybe 5% of the cases it is not respected and the chain of events get ignored.
B
58
S
18
G
13
Posts: 447
Reputation: 10,735

Post » Thu Dec 04, 2014 9:13 pm

we would have to see your events to be sure but most likely you have an event under the on animation finished event that is triggering right after it making it seem like its not working. or you have any event that makes it impossible to trigger. like for example "player is on ground play animation xxy"
B
42
S
17
G
2
Posts: 850
Reputation: 6,209

Post » Fri Dec 05, 2014 9:16 am

I suspected that too.
I had disabled all other "play animations" but it did not help.

I can't share my code because it sadly is too convoluted to share simple capx as the game bases on special engine.


I thought if I could let the events wait for same time length as the animation itself before executing the events. But I am not too well versed in how to pull this off. How would you do it? I thought of adding subevent, wait XX second to trigger a variable, and then run the "wait for animation to finish" event on the variable is triggered instead. But how to do it best..
B
58
S
18
G
13
Posts: 447
Reputation: 10,735

Post » Fri Dec 05, 2014 9:22 am

Maybe you could help yourself by trying to create a simple prototype of just the part that doesn't work. It may then help you see what the problem is in your more complex project.
If your vision so exceeds your ability, then look to something closer.
Moderator
B
134
S
30
G
86
Posts: 5,416
Reputation: 59,518

Post » Fri Dec 05, 2014 9:48 am

Hmm. just to set up that thing and actually use it and see if the error persists, I have to use the complex engine. :P So many things that depends on it.

I would like to use an alternative that bases on timer instead for animation, but I could try to disable EVERYTHING that is not directly related to it. Rght now I am working hard with another bug, but I will return to this one later. Do not want to have two different versions. :)
B
58
S
18
G
13
Posts: 447
Reputation: 10,735

Post » Fri Dec 05, 2014 12:14 pm

I discarded that other debug work, never get it work. So I got back to this one. I solved it by adding a global variable. For the sequence of events I set the variable to 1, and then for next event, its condition is variable set to 1 (trigger once) and then end of it, set to 2, and so on. So NO ESCAPE!

And then for the animation end, I replaced the condition with event like this:

Conditon:
TubeProcess = 1 - System: Wait 0.2 seconds
(and)
Trigger Once.
Blank Subevent: System: Set TubeProcess to 2

That did the trick for the animation length.
B
58
S
18
G
13
Posts: 447
Reputation: 10,735


Return to How do I....?

Who is online

Users browsing this forum: brunopalermo, Microbex and 18 guests