temnix Posted August 1, 2020 Share Posted August 1, 2020 (edited) I'm making some floor traps, scripted, and I find that they are unreliable. They don't always release with the standard Entered() trigger. The regions are modest-sized, and perhaps the traps would trigger more readily if I made them into huge mattresses to stomp over, but that's ridiculous. And I don't remember existing traps ever failing to react, even if the regions are thin strips. In this case, though, I also need a timer among triggers so that traps respond only once every 7 seconds: IF Entered([ANYONE]) !GlobalTimerNotExpired("RESET","GLOBAL") !Class(LastTrigger,THIEF) < - This excludes some thieves in the area IsOverMe(LastTrigger) THEN RESPONSE #100 DisplayString(LastTrigger,@135) // Trap Sprung <- A duplicate string with an attached sound file in the hopes of avoiding sound override from the next action PlaySound("TRAPCO_#") ReallyForceSpellRES("ACIFIR_#",LastTrigger) // <NO TEXT> SetGlobalTimer("RESET","GLOBAL",7) END The timer may be complicating things, because it makes using IsOverMe necessary. Without it when the timer expires the trap will fire at LastTrigger, even if the character is already away from the region. Perhaps IsOverMe makes Entered redundant in turn, but I didn't notice any improvements without it. These traps are just sluggish. Are there any life hacks for improving their reaction? Edited August 1, 2020 by temnix Quote Link to comment
Recommended Posts
Join the conversation
You are posting as a guest. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.