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