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.
Can be called from server or client.
float getAngle(int objectID)
Get the direction/angle of a unit or player in the range 0-360.
print("Player angle: " + getAngle(PLAYER_OBJECT));
float getDir(int objectID)
Alias for getAngle
void setAngle(int objectID, float angle)
Set the angle/direction of a unit or player in the range 0-360.
setAngle(PLAYER_OBJECT, 180);
Server/single player can set any unit or player angle.
Can be called from server or client.
void setDir(int objectID, float angle)
Alias for setAngle
float getHeight(int objectID)
Get the height above the ground of an object.
print(getHeight(PLAYER_VEHICLE));
float getMaxHeight(int objectID)
Get the maximum height above the ground of an object.
print(getMaxHeight(PLAYER_VEHICLE));
Index