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.
float getHeight(int objectID)
Get the height above the ground of an object.
print(getHeight(PLAYER_OBJECT));
float getMaxHeight(int objectID)
Get the maximum height above the ground of an object.
print(maxHeight(PLAYER_OBJECT));
Index
Generated on the 23 November 2024 at 08:20:44 (UK Time)