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

Play RetroMUD
Post new topic  Reply to topic     Home » Forums » CMUD Beta Forum
austin
Beginner


Joined: 07 Dec 2006
Posts: 16

PostPosted: Thu Dec 07, 2006 11:31 pm   

[1.20] trigger loop problem
 
I have no idea what went wrong here, so I'll just give the whole sequence of what I think is related to the problem.

I went into the settings window and created a new package. Then I created several new classes and some triggers in those classes.

Then I created a class called "comms" to put my capture triggers for things like narrate, chat, tell, etc. in. I created a trigger for " narrate" and put "#cap comms" in the script window. After clicking the save changes button, a narrate popped up in my mud window. CMUD created a window called "comms" just like it should and then proceeded to go into an infinite loop repeatedly printing the captured narrate line in the new comms window. A second later, CMUD popped up a window saying that a trigger was in an infinite loop and gave me the option of disabling triggers.

I clicked the disable option and that stopped the loop. I then went back to the settings window and attempted to re-enable the trigger using the enable checkbox (I may have noticed the class's enable checkbox had been unchecked as well and re-checked it. I don't remember.) But the trigger would not reactivate. I tried to create new triggers, but they would not work.

Then I went to File -> Close Session. Then I double-clicked on a session icon, and CMUD crashed. When I restarted CMUD, the triggers began working correctly.
Reply with quote
Zugg
MASTER


Joined: 25 Sep 2000
Posts: 23379
Location: Colorado, USA

PostPosted: Thu Dec 07, 2006 11:50 pm   
 
When creating a new package, CMUD creates the default Module in the package to be "Published". This means that it is visible to ALL windows, including any new windows that you create.

So you put your capture trigger in that module. All windows can see it.

You created the Comms window. The Comms window also sees the capture trigger in your published module.

You need to click on your Comms window in the settings editor and uncheck the package that contains the capture trigger (in the list of enabled packages). If the Comms window is being created in the same package as the capture trigger, then just change the Module containing the trigger to be External instead of Published. This will prevent the trigger from being seen by local windows in the same package.

In general, the way you are supposed to use Capture Triggers is to place them within the specific window that you want them acted on, and *not* place them in a new module unless you really know what you are doing and really understand how packages and modules work.
Reply with quote
Display posts from previous:   
Post new topic   Reply to topic     Home » Forums » CMUD Beta Forum 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