But doesn't that only work once? After that, the value of the variable is "false", and nothing happens when you enter another room, right?
I solved a similar issue by using a tempTimer, like this:
I have set a global variable "skin" with a default (integer) value of 0 to make sure I can always skin a corpse when I login. My trigger has the following small code snippet:
Code: Select all
if skin == 0 then
skin = 1
send ("get all heart to sack")
tempTimer (2, [[skin = 0]])
end
So, when I skin a corpse, the trigger fires on the first line that matches, it gets all hearts from the ground and puts them in a sack and, at the same time, the variable value changes to 1 preventing the trigger from firing on subsequent matching lines until, after 2 seconds, the variable value is set back to 0 so the next time I skin a corpse, the trigger will fire again.