Research Article

Challenges and Solutions of the Application of Data-Driven Technology in Network 3D Game Design

Table 2

List of conditional functions.

FunctionFeaturesFunction parameterReturn 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 foundDistance: the distance between the monster and the player, in metersReturns true if the player is found within the distance, otherwise returns false
bool random (int value)Random functionValue: 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 outtimer_id: timer number NoReturns true if the timer times out, otherwise false;
bool compareHP (string operator, int value)Compare the monster’s HP value with the parameter valueOperator: “>” or “<” value: compare valuesReturns 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 rangeOperator: “>” or “<” value: compare valuesReturns the comparison result, true or false; also returns true if no player is found