This shows you the differences between two versions of the page.
| Both sides previous revisionPrevious revision | |||
| xg:class:damage [2018-10-20 07:36] – [Damage (XG class)] skyjake | xg:class:damage [2019-11-26 18:36] (current) – [Damage (XG class)] skyjake | ||
|---|---|---|---|
| Line 1: | Line 1: | ||
| + | ====== Damage (XG class) ====== | ||
| + | |||
| + | |||
| + | < | ||
| + | </ | ||
| + | Damages or heals the activator. | ||
| + | For example, when triggering a switch the player could receive a " | ||
| + | |||
| + | Damage class lines can only affect the activator of the line. It is possible however, to use an XG sector' | ||
| + | |||
| + | |||
| + | ===== Parameters ===== | ||
| + | |||
| + | |||
| + | ^ 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' | ||
| + | |||
| + | |||
| + | |||
| + | ===== Example ===== | ||
| + | |||
| + | | ||
| + | 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). | ||
| + | |||
| + | |||