quick very newb question about enabling triggers

Posted by Tigers12 on Thu 29 Oct 2009 06:51 PM — 2 posts, 11,961 views.

#0
I am trying to have one trigger (when matched), send a command to mud (move east, eg) and enable 2 other triggers (and possibly disable itself though I could add the disabling in the subsequent trigger easily).

Is there a command I can put into the Trigger 'Send' box that simply enables (or disables) another trigger (without specifying a true/false). If so, what is it? And if so, where do I set the 'Send to' dropdown assuming I want to send a command to the mud (moving) in addition to enabling 2 triggers and disabling the current one?

I am positive this can all be done by an efficient script, but I am still learning scripting (slowly), and in the meantime, if there is a simple command that enables a separate trigger (no questions asked) then my needs will be met.

I have a bunch of named Triggers made, just curious as to how one can simply Enable/Disable them (by name) inside another trigger. Something like EnableTrigger(triggername)? Though I know this doesn't do it.

Amended on Thu 29 Oct 2009 07:33 PM by Tigers12
Australia Forum Administrator #1
Template:function=EnableTrigger
EnableTrigger

The documentation for the EnableTrigger script function is available online. It is also in the MUSHclient help file.



Tigers12 said:

And if so, where do I set the 'Send to' dropdown assuming I want to send a command to the mud (moving) in addition to enabling 2 triggers and disabling the current one?


You need "send to script". Once you are scripting you can do lots of things. For example:


EnableTrigger("triggerb", true)   -- enable another trigger 
EnableTrigger("triggerc", true)   -- and yet another
EnableTrigger("triggera", false)   -- disable myself
Send ("east")   -- send to MUD
Send ("open door")  -- send something else


Make sure you give the triggers names (labels).

Also if you have a "bunch" you can instead put the into a group (put a name in the group field) and then enable the whole lot at once (or disable it).

Template:function=EnableTriggerGroup
EnableTriggerGroup

The documentation for the EnableTriggerGroup script function is available online. It is also in the MUSHclient help file.