[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
97
S
22
G
178
Posts: 4,118
Reputation: 104,043

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
359
S
214
G
72
Posts: 22,951
Reputation: 178,578

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
97
S
22
G
178
Posts: 4,118
Reputation: 104,043


Return to Closed bugs

Who is online

Users browsing this forum: No registered users and 2 guests