Hpl3:Game:scripting:user modules:attack meter
Jump to navigation
Jump to search
Contents
Attack Meter
Helper function prefix: AttackMeter_
The attack meter module is used to tell the player that they are in danger and, if they don't escape the danger in time, applies damage to them, knocks them down and kills them. It's used by AI agents, and also for when (for example) the player jumps off a cliff.
Important Functions
AttackMeter_AddInstance
Adds a given object as a source of damage that's about the hurt the player.
AttackMeter_RemoveInstance
Removes a given object as a source of damage.
AttackMeter_AutoDamage
Automatically damages the player after a set time (useful for death from the environment/falling etc.)
AttackMeter_SetCustomDamageCallback
Set a custom callback to be called instead of the built-in damage effects.
AttackMeter_SetAfterDamageCallback
Set a custom callback to be called after the normal damage effects are applied.