en:modulebuilding:randomtraps
Differences
This shows you the differences between two versions of the page.
| Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
| en:modulebuilding:randomtraps [2025/11/13 00:52] – shadooow | en:modulebuilding:randomtraps [2025/11/13 23:39] (current) – [Static Traps On Objects] shadooow | ||
|---|---|---|---|
| Line 13: | Line 13: | ||
| * TRAP_SEARCH_MIN integer X - minimal DC of the random traps for search | * TRAP_SEARCH_MIN integer X - minimal DC of the random traps for search | ||
| * TRAP_SEARCH_MAX integer X - maximum DC of the random traps for search | * TRAP_SEARCH_MAX integer X - maximum DC of the random traps for search | ||
| - | * TRAP_OBJECTS integer | + | * TRAP_OBJECTS integer 1 - if set to 1 it changes the default |
| * TRAP_UNLIMITED integer X - percentual chance for the traps to be unlimited (ie. not disappearing after triggering) | * TRAP_UNLIMITED integer X - percentual chance for the traps to be unlimited (ie. not disappearing after triggering) | ||
| {{: | {{: | ||
| And lastly, set TRAP_ALLOW variable to -1 on every non-invisible door and useable placeable that you don't want the random trap to be ever spawned. | And lastly, set TRAP_ALLOW variable to -1 on every non-invisible door and useable placeable that you don't want the random trap to be ever spawned. | ||
| + | |||
| + | 85% traps will be spawned on the floor unless there are no, or not enough, objects to spawn trap at. Traps will respawn automatically when disarmed, recovered or triggered. | ||
| ===== Static Traps On Objects ===== | ===== 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. | 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. | + | First of all, set the object script **//trap_respawn//** into OnDisarm event. |
| {{: | {{: | ||
| - | If the trap is one-shot then add also **//sh_trap_trigger//** script into OnTrapTriggered event. | + | If the trap is one-shot then add also **//trap_triggered//** 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: | By default the trap will respawn with same type, DCs in about 1250-1450 seconds. You can change this via these variables: | ||
en/modulebuilding/randomtraps.1762995122.txt.gz · Last modified: 2025/11/13 00:52 by shadooow
