...
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.
...
Registers a trigger on HP increasesdecreases. 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.
...
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"); |
addNamedEntityListener_ssf_
Associates a listener with a named entity property. Whenever that field changes the specified user event is triggered. Valid property names are:
- state
- param1
- param2
The name of the entity cannot be listened to because it cannot change. Several listeners (even with the same parameters) can be associated to each property.
Arguments: s(Name),s(Property),f(user_event_n)->
Parameters:
[in] | Name | the name of the named entity to listen to |
[in] | Property | the property of the named entity to listen to |
[in] | user_event_n | the user event to trigger |
Code Block |
---|
()addNamedEventListener("Invasion", "state", 6); |