User Tools

Site Tools


Damage (XG class)

Class = damage

Damages or heals the activator. For example, when triggering a switch the player could recieve a “shock”.

Damage class lines can only affect the activator of the line. It is possible however, to use an XG sector's floor chain to “call” an line of damage class in order to deal damage to all THINGS in a sector (e.g., the damage a player receives when walking in lava).


Prm Name Type Meaning
Ip0 Min Delta Integer Minimum amount of damage to deal. Use negative values to heal the activator. The real amount of damage is a random number between the minimum and maximum.
Ip1 Max Delta Integer Maximum amount of damage to deal. Use negative values to heal the activator.
Ip2 Min Limit Integer Minimum required activator health. If it's below this, nothing will be done. Can be used to make the function non-lethal, for example.
Ip3 Max Limit Integer Maximum activator health. When healing, the activator's health won't rise above this.


Line Type {
  ID = 5006
  Comment = "Give health when player uses"
  Flags = player_use
  Flags2 = when_act | any
  Class = damage
  Count = -1
  Time = 1
  Min Delta = -5
  Max Delta = -15
  Max Limit = 150

The line is triggered when the player uses the line (Flags = player_use). The line is active in any skill mode and any game type (Flags2 = any) and the line carries out it's action when active (Flags2 = when_act). The line can be triggered an infinite number of times (Count = -1). When activated, the line gives the activator (must be player) a random amount of health between -5 (Ip0 = -5) and -15 (Ip1 = -15). The line will only give the activator health if it's current health is lower than 150% (Ip3 = 150).

xg/class/damage.txt · Last modified: 2018-10-20 10:36 by skyjake