I've moved this thread to Plugin Support. Please be sure to post your threads in the correct forum next time. Thank you.
It works just fine for me using this as the plugin command:
addTimer <thismap>.<thisevent>.A 10 \setss([<thismap>, <thisevent>, 'A'], false)
that sets the action to take place after 10 seconds... the example you show has it set for 180 seconds, or 3 minutes per respawn.
EDIT: using the "<thismap>.<thisevent>.A" for your Name/Key also makes it so you don't have the problem you were having with only being able to make 1 tree. tested that plugin command with several events all activated at different timers and they all worked just fine and one of the best parts for this plugin is the fact that the timers tick down even while you are on another map! Perfect for a gathering profession 😀
I guess i am just stupid. Ty for the help and sorry for the posting in the wrong board 😀 .
It's solved, i just pasted this into the plugin command addTimer <thismap>.<thisevent>.A 10 \setss([<thismap>, <thisevent>, 'A'], false) i guess the problem was 180s.
Actually, Andar, that was only part of the problem, if they were copy/pasting the event over and over hoping for more gathering points the Key/Name would have had to been edited for every one to match those values, so using the method I described was actually the better option unless they wanted to do more work by editing every node xD
Not saying your fix wasn't the way, as that was gonna be my original fix til tried the more universal solution. 😀
The only reason you would really want to use a specific event id as a Name/Key is if you were wanting to trigger an NPC to move or something else to begin while you were else where... think of a puzzle where the door would only stay open for 30 seconds after solving it. For gathering chopping wood from one tree shouldn't trigger the cooldown on another trees timer.
The only reason I can see for your original plugin call to not work is if you had another one with the same name (5.1.A) that you triggered (added a timer for, with the same name) after chopping the tree, that did something else.
Putting <thismap> and <thisevent> as part of the timer name is a great idea - it means you don't have to manually change things when you duplicate the event, as already said above, but it also reduces the risk that you're going to get multiple things accidentally setting timers with the same name.
What I REALLY wanted to say here is that I suggest you move the plugin command to just before setting the self switch, or at least put it after the Show Text. The problem you have with the above (and this COULD be what happened as well) is that if your timer is set for 180 seconds and then you show a message, if the player leaves the message box on the screen for 180 seconds, the timer could go off before the self switch actually gets turned on. That means, this is what you want to happen:
- player activates event
- timer starts for 180 seconds
- player gets message about wood
- self switch A is turned on
- 180 seconds later, self switch A is turned off
But this is what might really happen
- player activates event
- timer starts for 180 seconds
- player gets message about wood but doesn't close the message window
- 180 seconds later, self switch A (which is still off) gets turned off (so no difference)
- player closes message window
- self switch A is turned on
- because timer has already reached 0, self switch A is never turned off
So if you're setting a timer to undo something that you're going to do a few commands down, make sure there's nothing that requires player input/action in between those two commands.