| on_damage(func_name, obj_name[, percent]) |
|
| Parameters: |
| func_name | | (string) name of the function, or "" to unregister the event |
| obj_name | | (string) name of the character or vehicle |
| percent | | (float, optional) hit point threshold, specified as a percentage of maximum hit points between 0 and 1 (defaults to a tiny amount of damage) |
| |
| Returns: |
| none |
|
| Description: |
| Register a callback function for when a character or vehicle's hit points reaches a certain threshold. For vehicles, when the callback is executed, the following parameters are passed to it: - (string) name of the vehicle that reached the hit point threshold - (string) name of the character or vehicle responsible for causing the damage For characters, no parameters are passed to the callback. |
| |
|
| back to index | SR3 Script Action Documentation Last updated: Tue, 09 Aug 2011 11:32:15 |