Meteor 2 Scripting Functions
Output
void log(string text)
Output text to the log only.
log("Hello Log!");
void logPrint(string text)
Print text to the screen and console. Also output text to the log file.
logPrint("Hello Log World!");
void print(string text, string col="FFFFFF", int destPlayerID=NET_EXEC_DEST_LOCAL)
Print text to the screen and console either locally (default) or on other computers.
print("This is a local message");
print("This is a local message", "#FFFFFF", NET_EXEC_DEST_LOCAL);
print("This is a local message in blue", "#0000FF");
print("Hello server", "#FFFFFF", NET_EXEC_DEST_SERVER);
print("Hello all", "#FFFFFF", NET_EXEC_DEST_ALL);
print("Hello everyone else", "#FFFFFF", NET_EXEC_DEST_ALL_REMOTE);
print("Hello all clients", "#FFFFFF", NET_EXEC_DEST_ALL_CLIENTS);
print("Hello calling player", "#FFFFFF", getScriptPlayerID());
print("Hello specific player", "#FFFFFF", 2);
void printObject(string text, string col, int objectID)
Print text to the screen and console for the player with the specified object ID.
printObject("Hello me", "#FFFFFF", PLAYER_OBJECT);
printObject("Hello object ID 10", "#FFFFFF", 10);
Useful function to print text to a player by object ID instead of player ID.
If the object is a vehicle containing multiple players then all players in the vehicle will print the text.
void printNear(string text, string col, int objectID, float radius=500.0)
Print text to the screen and console for players near the specified object ID.
printNear("Hello nearby people!", "#FFFFFF", PLAYER_OBJECT);
printNear("Hello players near object 10", "#FFFFFF", 10);
printNear("Hello players within 1000 pixels of object 10", "FFFFFF", 10, 1000);
radius is in pixels and defaults to 500 pixels if not specified.
void printNear(string text, string col, vector2 pos, float radius=500.0)
Print text to the screen and console for players near the specified position.
printNear("Hello players near sector 2!", "#FFFFFF", getSectorPos(2));
radius is in pixels and defaults to 500 pixels if not specified.
Index