|
Function | Features | Function parameter | Return value |
|
bool find target (float distance) | Search for a player within the specified range of distance, and set the player as the target if a player is found | Distance: the distance between the monster and the player, in meters | Returns true if the player is found within the distance, otherwise returns false |
bool random (int value) | Random function | Value: integer of [0, 100] | Value greater than a randomly generated integer [0, 100] returns true, otherwise false |
bool check timer (int timer_id) | Check if the timer numbered timer_id has timed out | timer_id: timer number No | Returns true if the timer times out, otherwise false; |
bool compareHP (string operator, int value) | Compare the monster’s HP value with the parameter value | Operator: “>” or “<” value: compare values | Returns the result of the comparison, true or false |
Bool compare distance to target (string operator, int value) | Whether the distance between the monster and the target player is within a certain range | Operator: “>” or “<” value: compare values | Returns the comparison result, true or false; also returns true if no player is found |
|