Meteor 2 Scripting Functions
Sprite
int createSprite(string spriteName, vector2 pos, uint8 side)
Create a sprite (server only).
createSprite("objects\\arrow.spr", getPos(PLAYER_OBJECT), 0, 0);
void deleteSprite(int spriteID)
Delete a sprite (server only).
int sprite = createSprite("objects\\arrow.spr", getPos(PLAYER_OBJECT), 0, 0);
deleteSprite(sprite);
bool getSpriteHidden(int spriteID)
Get sprite hidden status.
print(getSpriteHidden(1));
void setSpriteHidden(int spriteID, bool hidden)
Show or hide a sprite.
setSpriteHidden(1, true);
float getSpriteLifetime(int spriteID)
Get a sprite's remaining lifetime (server only).
print(getSpriteLifetime(1));
lifetime is in seconds (0 for no lifetime specified).
void setSpriteLifetime(int spriteID, bool hidden)
Set a sprite's remaining lifetime in seconds (server only).
int sprite = createSprite("objects\\arrow.spr", getPos(PLAYER_OBJECT), 0, 0);
setSpriteLifetime(sprite, 5.25);
Set lifetime to 0 to not automatically delete.
Note that wrecks and corpses are deleted automatically once map limits are reached.
Index
Generated on the 23 November 2024 at 08:20:44 (UK Time)