|
Josiah.Bruns Apprentice
Joined: 04 Mar 2007 Posts: 103
|
Posted: Tue Nov 10, 2009 4:42 pm
question about events. |
it appears that if i raise an event from inside and event that the event i am leaving from does not continue to run is that correct?
ex.
if i am in an event called RunToLocation
blaa blaa blaa
#raise CheckForMuck
sigil soldier
sigil soldier never executes?? |
|
|
|
Josiah.Bruns Apprentice
Joined: 04 Mar 2007 Posts: 103
|
Posted: Thu Nov 12, 2009 6:47 pm bump |
when you leave one event by raising another event will the code return to the first event after the second event finishes?
|
|
|
|
Arde Enchanter
Joined: 09 Sep 2007 Posts: 605
|
Posted: Thu Nov 12, 2009 7:45 pm |
You can write a test yourself. It's not so hard.
Code: |
<event event="Event1" priority="10" id="1">
<value>#SAY "Event 1 start"
#RAISE Event2
#SAY "Event 1 end"</value>
</event>
<event event="Event2" priority="20" id="2">
<value>#SAY "Event 2 start"
#SAY "Event 2 end"</value>
</event>
<alias name="test" id="3">
<value>#RAISE Event1</value>
</alias> |
Type test to see the result.
Output:
Event 1 start
Event 2 start
Event 2 end
Event 1 end |
|
_________________ My personal bug|wish list:
-Wrong Priority when copy-paste setting
-1 prompt trigger for Mapper, Session and General Options, not 3 different!
-#SECTION can terminate threads
-Buttons can't start threads
Last edited by Arde on Thu Nov 12, 2009 8:33 pm; edited 1 time in total |
|
|
|
Rahab Wizard
Joined: 22 Mar 2007 Posts: 2320
|
Posted: Thu Nov 12, 2009 7:52 pm |
Yes, it is supposed to, and it seems to work for me in version 3.12. I don't have time to check it on version 2.37, but a quick look through the version history doesn't show this as a recent bugfix. Are you certain that 'sigil soldier' is not executing?
|
|
|
|
Josiah.Bruns Apprentice
Joined: 04 Mar 2007 Posts: 103
|
Posted: Thu Nov 12, 2009 7:54 pm |
thanks that test worked.
It appears that the events are returning back to the event that called it and finishing up the calling event. |
|
|
|
Rahab Wizard
Joined: 22 Mar 2007 Posts: 2320
|
Posted: Mon Nov 16, 2009 2:35 pm |
That is correct. When an event is raised, Cmud will immediately start processing all the instances of that event. Then it returns and finishes processing the trigger which raised the event.
|
|
|
|
|
|