User Tools

Site Tools


en:modulebuilding:randomtraps

Random and Respawning Traps

todo

Static Traps On Objects

If you trapped some object such as door or placeable, you will probably want it to grant experiences for disarming and to respawn.

First of all, set the object script sh_trap_disarm into OnDisarm event.

If the trap is one-shot then add also sh_trap_trigger script into OnTrapTriggered event.

By default the trap will respawn with same type, DCs in about 1250-1450 seconds. You can change this via these variables:

  • TRAP_RESPAWN integer X - where X is number of settings for trap to respawn
  • TRAP_DISARM_MIN integer X - as above
  • TRAP_DISARM_MAX integer X - as above
  • TRAP_SEARCH_MIN integer X - as above
  • TRAP_SEARCH_MAX integer X - as above
  • TRAP_UNLIMITED integer X - as above

If random traps are set up in area and you don't set any of the variables then numbers for random traps are used instead.

en/modulebuilding/randomtraps.txt · Last modified: 2025/11/12 22:54 by shadooow · Currently locked by: shadooow