temporary tiggers

Posted by Krum on Sun 17 Apr 2005 12:57 AM — 3 posts, 19,326 views.

#0
I am new to this.

How can I create a temporary trigger, which would disappear after being triggered once?

function unwearArmour ()
Send ("remove armour")

then I want to wait for the message "You have recovered balance on all limbs." And when I get that trigger:

Send ("put armour in "..var.MyBag)
end

I read something about flags in the help files, but couldn't figure it out.
USA #1
(Almost) independant of the scripting language you happen to be using:
http://www.gammon.com.au/scripts/function.php?name=AddTrigger
Just make sure your flag includes "temporary" (16384), whether you include it with constants, or with numbers themselves.
Australia Forum Administrator #2
This doesn't auto-delete on firing, it just doesn't save it to the world file. Why would you want to do this? It would be easier to have the trigger disable itself in the script, and then re-enable it when you want it to be active again.