|
teion Wanderer
Joined: 03 May 2005 Posts: 72
|
Posted: Tue Mar 01, 2016 8:33 pm
deleting all triggers in a class |
Hi I have a class with many temporary triggers that sometimes do not all get fired depending on the situation. Is there a way to remove all the temporary triggers without deleting everything else in the class. for the sake of argument lets call the class armour
in the disable script portion of the class i have something like this #unt {} armoury
basically im trying to remove the triggers when disabling this class without having to write out each one by hand |
|
|
|
shalimar GURU
Joined: 04 Aug 2002 Posts: 4691 Location: Pensacola, FL, USA
|
Posted: Wed Mar 02, 2016 3:42 am |
Unfortunately not.
Even forcing them into another class to try and #UNCLASS the lot will not work, as the homeless settings just move into the parent.
What exactly are you doing that requires so many #TEMPs in the first place?
I might be able to think of a better way if you describe the situation. |
|
_________________ Discord: Shalimarwildcat |
|
|
|
teion Wanderer
Joined: 03 May 2005 Posts: 72
|
Posted: Wed Mar 02, 2016 2:41 pm |
I am writing a script that sorts the armory but first it gets an inventory of the containers in the room. For example I create 2 different triggers for each situation where I type inventory here all pack
the mud output will display either Packs : [2] or Pack : [1]
so one of the temp triggers doesn't get used and needs to be deleted or it will keep building in the class. I suppose I could solve this by using a conditional but I've never had much luck with those.
Anyway the trigger does this #temp {^ Packs : ~[%1~]} {#va numberpacks %1 "" armory} armory
I do that for 5 items so 10 triggers in total have to be untriggered before the class is exited. |
|
|
|
Vijilante SubAdmin
Joined: 18 Nov 2001 Posts: 5182
|
Posted: Wed Mar 02, 2016 8:04 pm |
Create the temporary triggers with ID's and then you can #UNTRIGGER them based on ID. You could also create all of them in another class and then #DELCLASS on that separate class.
|
|
_________________ The only good questions are the ones we have never answered before.
Search the Forums |
|
|
|
Daern Sorcerer
Joined: 15 Apr 2011 Posts: 809
|
Posted: Fri Mar 04, 2016 2:12 am |
So just to clarify, the issue is just with the pluralization? You could use "Pack{s|}" in your pattern to match either an S, or nothing.
|
|
|
|
teion Wanderer
Joined: 03 May 2005 Posts: 72
|
Posted: Fri Mar 04, 2016 8:09 pm |
thank you fixed!. the last syntax helped
|
|
|
|
|
|