Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 4 Next »

Spawn / Despawn

spawn__

Spawns the current group.

Arguments: ->

()spawn(); // spawn group.

despawn_f_

Depawns the current group.

Arguments: f(Immediately)->

Parameters:

Immediately - this is whether the group despawns immediately or not. If the group does not despawn immediately it will wait until it is idle, e.g. not fighting or fleeing, to despawn. A value of 0 (zero) is no, a value of 1 is yes.

 

()despawn(0); // despawn group.
()despawn(1); // immediately despawn the group.

 

Event Handler Creation

addHpUpTrigger_ff_

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 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:

Threshold - this is the HP threshold factor.

user_event_n - this is the user event to trigger.

 

()addHpUpTrigger(0.5, 4); // emit user event 4 if a bot increases HP by 50%

 

delHpUpTrigger_ff_

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:

Threshold - this is the HP threshold factor

user_event_n - this is the user event to trigger.

 

()delHpUpTrigger(0.5, 4);
  • No labels