Skip to content
DerelictDrone edited this page May 28, 2025 · 1 revision

Jump to table of contents

Damage

Number = Damage:isType(Number Type)

Returns whether the damage contains the type flag provided. For example isType(_DMG_BLAST) would return 1 if the damage contains blast damage. (1 ops)

Number = Damage:getAmount()

Returns the amount of damage dealt (1 ops)

Vector = Damage:getPosition()

Returns the position where the damage was dealt (1 ops)

Vector = Damage:getForce()

Returns the force of the damage dealt (1 ops)

Entity = Damage:getInflictor()

Returns the inflictor (weapon) which caused the damage to be dealt (1 ops)

Entity = Damage:getAttacker()

Returns the attacker which used the inflictor to deal the damage (1 ops)

Number = Damage:getAmmoType()

Returns the ammo type id of the damage dealt (1 ops)

Entity:takeDamage(Number Amount)

Applies an amount of damage to the player. Requires wire_expression2_damage_enabled to be set to 1. (20 ops)

Entity:takeDamage(Number Amount, Entity Attacker)

Applies an amount of damage to the player with given attacker. Requires wire_expression2_damage_enabled to be set to 1. (20 ops)

Entity:takeDamage(Number Amount, Entity Attacker, Entity Inflictor)

Applies an amount of damage to the player with given attacker and inflictor. Requires wire_expression2_damage_enabled to be set to 1. (20 ops)

blastDamage(Vector Origin, Number Radius, Number Damage)

Creates blast damage at the position provided with specified radius and damage amount. Requires wire_expression2_damage_enabled to be set to 1. (10 ops)

Expression 2 ⚙️

Getting Started 🕊

Guides (In learning order) 🎓

Tools 🛠️

Click To Expand

Advanced

Beacon 💡

Control 🎛️

Data 💿

Detection 👀

Display 💻

Render 🖌

I/O 🔌

Physics 🚀

Utilities 🛠️

RFID 💳

Wireless 🛜

Gates 🚥

Click To Expand

TBD

Extras 🔭

Clone this wiki locally