Datasets:
Tasks:
Text Generation
Modalities:
Text
Formats:
text
Languages:
Russian
Size:
10K - 100K
Tags:
code
License:
Fakemeta function : | |
Code: | |
EngFunc_MoveToOrigin | |
Description : | |
Moves an entity a defined distance toward a coordinate. | |
If the distance between Entity and Destination is less than the required distance, the entity will pass over that point. | |
Usage : | |
Code: | |
engfunc(EngFunc_MoveToOrigin, iEnt, Float:Destination[3], Float:Distance, iMoveType); | |
Parameters | |
iEnt = Entity index | |
Destination[3] = A Coordinate toward which the entity moves | |
Distance = The distance to move the entity | |
iMoveType = This is the MOVE_* option used for monsters and players to change the behaviour of the movement | |
Code: | |
#define MOVE_NORMAL 0 // normal move in the direction monster is facing | |
#define MOVE_STRAFE 1 // moves in direction specified, no matter which way monster is facing | |
#define MOVE_STUCK_DIST 32 // if a monster can't step this far, it is stuck. | |
#define MOVE_START_TURN_DIST 64 // when this far away from moveGoal, start turning to face next goal | |
Caveats : | |
iEnt must be on ground | |
If there's an object closer than Distance that iEnt could collide then the movement is not done | |
If there's a ramp, it works like an object and the movement is not done |