[R71] trigger an event at included sheet

Bugs will be moved here once resolved.

Post » Wed Dec 14, 2011 1:04 am

Hi,

In this post, Kiyoshi find a bug in my function plugin.

In this case, user include 2 event sheets.
1. In 1st included event sheet, user use action to trigger the event.
2. After step 1, the 2nd included event sheet can not run.

I trace the execution flow in firebug. I guess -

1. the action to trigger event will scan all events in the sheet, include "include" sheets.
--> And mark the sheet.hasTriggered = true

2. now turn to normal execution, engine try to execute the next included sheet. but the
sheet.hasTriggered == true
in eveng.js, line 1453
[code]if (sheet.hasTriggered)
    return false; [/code]
So engine skip this sheet.rexrainbow2011-12-14 01:06:37
B
108
S
26
G
250
Posts: 4,404
Reputation: 141,125

Post » Wed Dec 14, 2011 4:16 pm

Ah, so is this a trigger calling another trigger? So runtime.trigger() is being called recursively?

I didn't write it to support that yet, so if that's the problem I can try and correct that...
Scirra Founder
B
386
S
229
G
87
Posts: 24,207
Reputation: 191,572

Post » Thu Dec 15, 2011 2:01 am

Humm... The first part is correct -- using a action to trigger another event.

The second part -- runtime.trigger() is being called recursively, I'm not sure. From my trace, "runtime.trigger()" seems to change the value of "sheet.hasTriggered". It might cause a bug with "include event sheet".
B
108
S
26
G
250
Posts: 4,404
Reputation: 141,125


Return to Closed bugs

Who is online

Users browsing this forum: No registered users and 1 guest