Meteor 2 Scripting Functions
Spatial
vector2 getPos(int objectID)
Get the position of a unit or player.
print("Player pos: " + getPos(PLAYER_OBJECT));
void setPos(int objectID, vector2 pos)
Set the position of a unit or player.
setPos(PLAYER_OBJECT, vector2(100, 100));
Server/single player can move any unit or player.
Multiplayer client can only move the local player.
float getDir(int objectID)
Get the direction of a unit or player in the range 0-360.
print("Player direction: " + getDir(PLAYER_OBJECT));
void setDir(int objectID, float dir)
Set the direction of a unit or player in the range 0-360.
setDir(PLAYER_OBJECT, 180);
Server/single player can set any unit or player direction.
Multiplayer client can only set the the local player direction.
Index
Generated on the 24 June 2024 at 06:55:37 (UK Time)