...
Registers a trigger on HP increasesdecreases. Whenever the HP level of a bot crosses the threshold downwards it will trigger the specified user event. The threshold is a factor of the total HP. Several triggers can be registered on the same group, even with the same threshold and event.
...
Code Block |
---|
()addHpUpTrigger(0.5, "onHPDecrease"); // call script function onHPDecrease if a bot decreases HP by 50% |
delHpUpTrigger_fs_
Unregisters a trigger on HP increases for any triggers matching both the Threshold and Callback parameters.
Arguments: f(Threshold),s(Callback)->
Parameters:
[in] | Threshold | the HP threshold factor |
[in] | Callback | the script callback to be triggered |
Code Block |
---|
()delHpUpTrigger(0.5, "onHPIncrease"); |
delHpDownTrigger_fs_
Unregisters a trigger on HP decreases for any triggers matching both the Threshold and Callback parameters.
Arguments: f(Threshold),s(Callback)->
Parameters:
[in] | Threshold | the HP threshold factor |
[in] | Callback | the user event to trigger |
Code Block |
---|
()delHpDownTrigger(0.5, "onHPDecrease"); |