Spawns the current group.
Arguments: ->
()spawn(); // spawn group. |
Depawns the current group. If the group does not despawn immediately it will wait until it is idle, e.g. not fighting or fleeing, to despawn.
Arguments: f(Immediately)->
Parameters:
[in] | Immediately | 0 or 1, with 1 indicating an immediate despawn |
()despawn(0); // despawn group. ()despawn(1); // immediately despawn the group. |
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 threshold is a factor of the total HP. Several triggers can be registered on the same group, even with the same threshold and event.
Arguments: f(Threshold),f(user_event_n)->
Parameters:
[in] | Threshold | the HP threshold factor |
[in] | user_event_n | the user event to trigger |
()addHpUpTrigger(0.5, 4); // emit user event 4 if a bot increases HP by 50% |
Registers a trigger on HP decreases. 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.
Arguments: f(Threshold),f(user_event_n)->
Parameters:
[in] | Threshold | the HP threshold factor |
[in] | user_event_n | the user event to trigger |
()addHpUpTrigger(0.5, 5); // emit user event 5 if a bot decreases HP by 50% |
Unregisters a trigger on HP increases 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 |
()delHpUpTrigger(0.5, 4); |
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 |
()delHpDownTrigger(0.5, 4); |
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 |
()addHpUpTrigger(0.5, "onHPIncrease"); // call script function onHPIncrease if a bot increases HP by 50% |
Registers a trigger on HP decreases. 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 |
()addHpUpTrigger(0.5, "onHPDecrease"); // call script function onHPDecrease if a bot decreases HP by 50% |
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 |
()delHpUpTrigger(0.5, "onHPIncrease"); |
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 |
()delHpDownTrigger(0.5, "onHPDecrease"); |