Determining of TriggerGroup enabled/disabled

Posted by Oligo on Fri 19 Apr 2013 05:46 PM — 2 posts, 13,007 views.

#0
I'm scripting in Mush 4.84 in Lua and using EnableTriggerGroup(). What is the best way to programatically tell if a trigger group is enabled/disabled?

The below doesn't seem to work, does GetTriggerInfo() work only for individual triggers?

GetTriggerInfo("trigger_group_name_here",8)

Australia Forum Administrator #1
Yes, you pass the name of a trigger, not a group.

Enabling a group is basically an iteration through all triggers, if the group name matches it is enabled (or disabled as required).

To see if a group is enabled you would have to iterate through all triggers, see if the group name matches, and note if everything in the group is enabled or disabled.

Template:function=GetTriggerList
GetTriggerList

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



That shows how to iterate through all triggers.