en:modulebuilding:randomtraps
This is an old revision of the document!
Random Traps Tutorial
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.1762988039.txt.gz · Last modified: 2025/11/12 22:53 by shadooow

