Since Player is the first object, for quick tests via chat you can access it by raw index like /gml =0.x or /gml 0.my_health = 4.
For technical reasons, currently you cannot create additional Player instances as of now.
Parent: hitme
Variables:
- nexthurt: when (see current_frame) the instance's invincibility ends.
Note that some damage sources do not use this scheme. - spr_idle: played if (speed == 0)
- spr_walk: played if (speed != 0)
- spr_hurt: 3-frame sprite for taking damage
- spr_dead: death+corpse sprite
- snd_hurt: played upon hit
- snd_dead: played upon death
- raddrop
- gunangle: current aiming direction (degrees)
- index: player index (P1 is 0, P2 is 1, etc.)
- joyx: raw gamepad X aim axis value (-1..1)
- joyy
- joyaimx: actual gamepad X aim axis value (with autoaim/smoothing in mind)
- joyaimy
- team: default team for players is 2
- size: unclear whether used for players at all
- race: race code (e.g. "fish" or "myrace")
- race_id: race index (1..16 for built-in, 17 for modded)
- wep: current primary weapon
- bwep: current secondary weapon
From hereon, anything with b prefix means that it's same as unprefixed but for the secondary weapon. - ammo: An array with ammo per weapon type.
Order is: melee (unused), bullets, shells, bolts, explosives, energy. - nearwep: nearest weapon (that would get picked up when pressing the button)
- curse: curse level for the primary weapon
0 is no curse.
1 is normal curse (uncursed via vault/looping).
higher values mean more vaults/loops to uncurse. - bcurse
- reload: cooldown for primary weapon
- breload
- reloadspeed: weapon reload speed multiplier (default is 1)
- clicked
- angle: Fish's roll angle
- sprite_angle: can be set to rotate the sprite without rotating the hitbox
- wepangle: weapon offset angle
-120 or 120 for melee weapons (flips on weapon swing).
0 for non-melee weapons. - bwepangle
- wepflip: displayed weapon xscale
Melee weapons flip this after a swing (when reload reaches 0). - bwepflip
- wkick: displayed weapon offset
For ranged weapons, is just how far weapon moves backwards/forwards.
For melee weapons, also affects weapon angle. - bwkick
- can_shoot: indicates whether a player could shoot something.
Is set to 0 upon firing a weapon and 1 when the weapon is reloaded.
Used very occasionally (e.g. for IDPD logic). - bcan_shoot
- specfiring: is set to true when firing via active ability (Y.V., Skeleton)
Can only be used inside weapon mod's weapon_fire script. - lasthit: Last damage source (to be shown on Game Over screen).
Allowed values are as following:- -1: Unknown cause
- 0..105: Built-in death causes
- 106+: Sprite index (sprite name is used as mouseover text)
- [<sprite>, <text>]: Custom death cause (a 2-element array)
So, for example, you could do
with (Player) { lasthit = [spr_idle, "Incompetence"]; my_health = 0; }
- hammerhead: remaining HammerHead charges (measured in wall blocks)
- hammering: hammerhead timer variable (walls are broken at >=12)
- canspirit: whether the player has Strong Spirit
- spiriteffect: SS timer - prevents the player from walling under 1 health
- footstep: counter for playing footstep sounds at correct animation frames
- footextra: counter for Extra Feet's dust particles
- bleed: Chicken's bleed timer. Death comes when it reaches 120
- safeheadloss: is set to 2 when reviving players to prevent max health loss
- chickendeaths: how many points are missing off max health
- chickencorpse: chicken head to remove when getting health back
- horrorcharge: Horror's beam charge (grows during use)
- horrornorad: frames until radiation can be attracted to player again
- horrorstopsnd: frames until Horror's beam sounds should be stopped
- rogueammo: currently available portal strikes for Rogue
- canrogue: whether Rogue's passive can trigger
- swapmove: does a 1-frame UI "bump" when changing weapons
- back: whether currently aiming upwards (for weapon display)
- right: whether currently facing right
- wepright: recalculated on draw to flip weapons when facing left
- frogcharge: grows while holding Frog's active
- wave: used for a variety of subtle visual effects
- smoke: counter for emitting smoke after touch an explosion with Boiling Veins
- interfacepop: is set to 2/4/6 when using Y.V.'s active to pop out more shells upon reloading
- binterfacepop
- usespec: if set, assumes that ability button is held down
- candie: whether the player can die
- canfire: whether the player can fire normally
- canspec: whether the player can use their ability
- canwalk: whether the player can move normally
- canpick: whether the player can pick up weapons
- canswap: whether the player can swap weapons
- canscope: whether the aiming laser should be shown
- canfeet: whether the player is affected by Extra Feet
- canaim: whether the player can aim normally (otherwise gunangle is used)
- notoxic: whether the player is immune to toxic gas
- drawempty: timer for "low ammo" / "empty" warning
- drawemptyb
- drawlowhp: timer for "low health" warning
- showhp: legacy debug - shows HP+rads above enemies
- roll: whether currently rolling (as Fish)
- infammo: if set to non-zero, ammo is not spent when shooting.
Values above 0 act as countdown in frames and display the effect.
Values below 0 are non-expiring infinite ammo and don't show the effect. - gunshine: determines the gun's "shine" frame. Trigger Fingers sets this to 7.
Setting it to 1 + current_time_scale would lock the gun in the "flash" frame. - bskin: 0 for A-skin, 1 for B-skin, string for custom
- dogammo: remaining shots for Big Dog's spin attack
- turn: turn direction for Big Dog's spin attack
- maxhealth: current maximum health (as in UI)
- maxspeed: peak movement speed
- accuracy: affects spread on various weapons.
- boilcap: Boiling Veins minimum health
- spr_shadow: shadow sprite (if any)
- spr_shadow_x: shadow X offset
- spr_shadow_y: shadow Y offset
- spr_fire: only used for Big Dog
- my_health: current health
- lsthealth: previously reported health
This is what determines the width of the "ghostly" healthbar.
Some effects (Rogue's passive, Sharp Teeth) check this to detect taking damage.
Once the player finishes playing the "hurt" animation, approaches health at rate of 0.5/frame. - prepareScoreGet: unused in NTT
- stream_submit: stores stream key request ID
Alarms:
- alarm2: Big Dog spin attack
- alarm3: Frog gas release
- alarm8: Stream key related
- alarm9: Stops Horror beam sound
- alarm10: Kills off-level enemies unless they have canfly set to true.
Parent: GameObject
Variables:
- maxspeed
- walking
- new
- spr_idle
- spr_walk
- spr_shadow
- spr_shadow_x
- spr_shadow_y
Alarms:
- alarm0
Allows to explode corpses one last time after dying as Melting.
Parent: projectile
Variables:
- hitid: see lasthit on Player
- team
- creator: hitme that created this projectile (if any)
- damage
- force: determines applied velocity on impact
- deflected
- typ: Projectile type,
- 1: Can be deflected by shields/melee (e.g. bullets)
- 2: Is destroyed by shields/melee (e.g. rockets)
- other: Cannot be deflected (e.g. lightning).
- bskin
- p
Parent: hitme
Variables:
- nexthurt: when (see current_frame) the instance's invincibility ends.
Note that some damage sources do not use this scheme. - creator
- wkick
- spr_chrg
- spr_fire
- raddrop
- maxhealth: maximum health
- meleedamage
- size
- spr_idle: played if (speed == 0)
- spr_walk: played if (speed != 0)
- spr_hurt: 3-frame sprite for taking damage
- spr_dead: death+corpse sprite
- right
- my_health: current health
- target
- team
- snd_hurt: played upon hit
- snd_dead: played upon death
- snd_mele
- spr_shadow: shadow sprite (if any)
- spr_shadow_x: shadow X offset
- spr_shadow_y: shadow Y offset
- walk
Alarms:
- alarm1
- alarm2
Parent: hitme
Variables:
- nexthurt: when (see current_frame) the instance's invincibility ends.
Note that some damage sources do not use this scheme. - creator
- wkick
- spr_chrg
- spr_fire
- raddrop
- maxhealth: maximum health
- meleedamage
- size
- spr_idle: played if (speed == 0)
- spr_walk: played if (speed != 0)
- spr_hurt: 3-frame sprite for taking damage
- spr_dead: death+corpse sprite
- spr_shadow: shadow sprite (if any)
- spr_shadow_x: shadow X offset
- spr_shadow_y: shadow Y offset
- gunspr
- right
- my_health: current health
- target
- team
- snd_hurt: played upon hit
- snd_dead: played upon death
- walk
- gunangle
Alarms:
- alarm1
- alarm2
- alarm4
- alarm5
Parent: projectile
Variables:
- hitid: see lasthit on Player
- team
- force: determines applied velocity on impact
- deflected
- typ: Projectile type,
- 1: Can be deflected by shields/melee (e.g. bullets)
- 2: Is destroyed by shields/melee (e.g. rockets)
- other: Cannot be deflected (e.g. lightning).
- rotspeed
- creator: hitme that created this projectile (if any)
- wep
- curse
- damage
Alarms:
- alarm0
Big Dog (character)'s missiles.
These are largely copies of boss missiles which is why they are a bit messy at best.
Parent: enemy
Variables:
- nexthurt: when (see current_frame) the instance's invincibility ends.
Note that some damage sources do not use this scheme. - spr_shadow: shadow sprite (if any)
- spr_shadow_x: shadow X offset
- spr_shadow_y: shadow Y offset
- my_health: current health
- spr_chrg: charge attack sprite, if any
- spr_fire: normal attack sprite, if any
- corpse: whether the enemy should leave a corpse
- canmelee: whether the enemy can deal contact damage right now
Any enemy can only deal contact damage once per second at most. - canfly: whether the enemy should not be killed for being off-level
- wepseed: set by level generator, used for weapon drops
- right: facing direction
- target: current player to pursue
- snd_hurt: played upon hit
- snd_dead: played upon death
- snd_mele: player upon dealing contact damage
- wkick: weapon offset for enemies that have them
- raddrop: number of rads dropped upon death
- maxhealth: maximum health
- meleedamage
- size
- hitid: see lasthit on Player
- spr_idle: played if (speed == 0)
- spr_walk: played if (speed != 0)
- spr_hurt: 3-frame sprite for taking damage
- spr_dead: death+corpse sprite
- creator
- index
- kills: number of kills added for killing this enemy
- team: default enemy team is 1, default IDPD team is 3
Alarms:
- alarm1
- alarm2
Created in coop when a player dies.
Note that a Player instance is re-created upon revival.
Parent: GameObject
Variables:
- canrevive
- revivetime
- corpse
- revive
- wep
- bwep
- rogueammo
- race
- maxhealth
- hammerhead
- chickendeaths
- savior
- ammo
- p
Alarms:
- alarm0: Distribute health, assign stuff
- alarm1
- alarm2
Parent: GameObject
Variables:
- bskin
- snd_spch
- snd_cptn
- spr_sit1
- spr_sit2
- spr_idle
Alarms:
- alarm0
- alarm1