Jump to content

Making traps more sensitive


temnix

Recommended Posts

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 by temnix
Link to comment

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.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...