Script TrapComponents
Components
crushTraps | Destroys traps with the "trapCrushable" tag |
secretFightMarker | |
trap | Generic component identifying a ground trap, which is any entity that acts a short time after being stepped on. |
trapBloodSprite | |
trapCast | Casts a spell whenever the trap is triggered. |
trapClientTrigger | Adds an event parameter whenever the trap is triggered for the first time in a given turnID by an entity.-- Duplicate presses caused by rollback are ignored. |
trapConvert | Converts the trap after being triggered. |
trapCrushable | Destroys the trap if it is triggered by an entity with the "crushTraps" tag |
trapDescend | Causes victims to fall down into the next level. |
trapDestructible | Destroys the trap if a spell with spellcastDestroyTraps is cast upon it |
trapEnchantWeapon | |
trapFirepig | Shoot aligned hostile entities |
trapFlyaway | |
trapInflictDamage | Inflicts damage to any entity triggering the trap. |
trapModifyMusicSpeed | Modifies the music's playback speed for a limited amount of time. |
trapMove | Forces any entity triggering the trap to move in a certain direction. |
trapMoveAbsoluteDirection | |
trapMoveRelativeDirection | |
trapOpenCharacterSelector | |
trapOpenLobby | |
trapOpenMenu | |
trapOpenModeSelector | |
trapScatterInventory | Scatters all inventory items held by an entity triggering the trap. |
trapSelectCharacter | |
trapSelfDelete | |
trapStartDailyChallenge | |
trapStartRun | |
trapTravel | Teleports the victim to specific coordinates |
trapTravelAutoConnect | |
trapVocalize | Makes the victim play the given voice component or sound |
trappable | Marks an entity as being potentially vulnerable to trap effects.-- For the entity to actually be trapped, it also needs to pass an attackability check. |
trappableResetOnConvert |
Components
- crushTraps
- Destroys traps with the "trapCrushable" tag
- secretFightMarker
-
default:
{}
- fights
constant table
default:{}
- expand constant bool (default false)
- started bool (default false)
- enemies table
- fights
- trap
-
Generic component identifying a ground trap, which is any entity that acts a short time after being stepped on.
- targetFlags int Specifies which entities can trigger the trap and are affected by its effects. (default attack.Flag.TRAP)
- triggerDelay constant float Specifies the delay (in seconds) upon stepping on the trap after which the its effects trigger. (default 0.2)
- trapBloodSprite
- trapCast
-
Casts a spell whenever the trap is triggered.
- spell constant string (default "")
- direction constant int (default action.Direction.NONE)
- trapClientTrigger
- Adds an event parameter whenever the trap is triggered for the first time in a given turnID by an entity.-- Duplicate presses caused by rollback are ignored.
- trapConvert
-
Converts the trap after being triggered.
- targetType constant string (default "")
- trapCrushable
- Destroys the trap if it is triggered by an entity with the "crushTraps" tag
- trapDescend
- Causes victims to fall down into the next level.
- trapDestructible
-
Destroys the trap if a spell with
spellcastDestroyTraps
is cast upon it - trapEnchantWeapon
-
- component string (default "")
- trapFirepig
-
Shoot aligned hostile entities
- litRange constant int (default 5)
- unlitRange constant int (default 4)
- collisionMask constant int (default collision.Group.WEAPON_CLEARANCE)
- cooldown constant int (default 6)
- action constant int (default action.Special.SPELL_1)
- trapFlyaway
-
- success constant localizedString (default 0)
- failure constant localizedString (default 0)
- trapInflictDamage
-
Inflicts damage to any entity triggering the trap.
- damage constant int (default 0)
- type constant int (default damage.Type.TRAP)
- trapModifyMusicSpeed
-
Modifies the music's playback speed for a limited amount of time.
- factor constant float (default 1)
- duration constant float (default 0)
- fadeIn constant float (default 0)
- fadeOut constant float (default 0)
- region int (default 0)
- trapMove
-
Forces any entity triggering the trap to move in a certain direction.
- moveType constant int (default move.Type.KNOCKBACK)
- trapMoveAbsoluteDirection
- trapMoveRelativeDirection
-
- rotation constant int (default action.Rotation.IDENTITY)
- trapOpenCharacterSelector
- trapOpenLobby
- trapOpenMenu
-
- menu string (default "")
- trapOpenModeSelector
- trapScatterInventory
-
Scatters all inventory items held by an entity triggering the trap. default:
{"misc", "hud", "torch", "shovel", "ring", "head", "feet", "body", "action", "weapon"}
- collisionMask constant int (default collision.mask(collision.Group.SOLID)
- droppedSlots constant table
- trapSelectCharacter
-
- character string (default "")
- trapSelfDelete
- trapStartDailyChallenge
-
- mode string (default "")
- trapStartRun
-
- mode string (default "AllZones")
- modifier string (default "")
- fileName string (default "")
- level int (default 0)
- trapTravel
-
Teleports the victim to specific coordinates
- collisionMask constant int (default collision.Group.SOLID)
- xOff constant int (default 0)
- yOff constant int (default 0)
- x int (default 0)
- y int (default 0)
- trapTravelAutoConnect
- trapVocalize
-
Makes the victim play the given voice component or sound
- component constant string (default "")
- sound string (default "")
- trappable
-
Marks an entity as being potentially vulnerable to trap effects.-- For the entity to actually be trapped, it also needs to pass an attackability check.
- immuneTurnID int Trap victims gain trap immunity until their next move. However, to allow stacked traps, further trapstriggering in the same turn bypass this immunity.This field contains the turn ID where the victim gained immunity.-1 = no immunity, -2 = immunity ignoring the "same turn" exception (default -1)
- trappableResetOnConvert