Register to post in forums, or Log in to your existing account
 

Play RetroMUD
Post new topic  Reply to topic     Home » Forums » CMUD General Discussion
Josiah.Bruns
Apprentice


Joined: 04 Mar 2007
Posts: 103

PostPosted: 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??
Reply with quote
Josiah.Bruns
Apprentice


Joined: 04 Mar 2007
Posts: 103

PostPosted: 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?
Reply with quote
Arde
Enchanter


Joined: 09 Sep 2007
Posts: 605

PostPosted: 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
Reply with quote
Rahab
Wizard


Joined: 22 Mar 2007
Posts: 2320

PostPosted: 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?
Reply with quote
Josiah.Bruns
Apprentice


Joined: 04 Mar 2007
Posts: 103

PostPosted: 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.
Reply with quote
Rahab
Wizard


Joined: 22 Mar 2007
Posts: 2320

PostPosted: 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.
Reply with quote
Display posts from previous:   
Post new topic   Reply to topic     Home » Forums » CMUD General Discussion All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum

© 2009 Zugg Software. Hosted by Wolfpaw.net