Meteor 2 Scripting Functions
Projectile
int getProjectileOwner(int projectileID)
Get a projectile owner's object ID.

Example
print(getProjectileOwner(123));

See also
getProjectileInstigator

int getProjectileInstigator(int projectileID)
Get a projectile instigators's object ID.

Example
print(getProjectileInstigator(123));

Comments
A projectile instigator can differ from the owner. For example if a projectile fired from a vehicle, the vehicle is the owner and the person inside the gunner's seat is the instigator.

See also
getProjectileOwner

float getProjectileSpeed(int projectileID)
Get a projectile's speed.

Example
print(getProjectileSpeed(123));

Comments
Speeds are match the projectile editor definition except for fast projectiles (bullets).

vector2 getProjectilePos(int projectileID)
Get a projectile's position in pixels.

Example
print(getProjectilePos(123));

See also
setProjectilePos

void setProjectilePos(int projectileID, vector2 pos)
Set a projectile's position in pixels (single player/server only).

Example
setProjectilePos(123, getPos(100, 100));

See also
getProjectilePos

float getProjectileAngle(int projectileID)
Get a projectile's angle in degress.

Example
print(getProjectileAngle(123));

See also
setProjectileAngle

void setProjectileAngle(int projectileID, float angle)
Set a projectile's angle in degress (single player/server only).

Example
setProjectileAngle(123, 180);

See also
getProjectileAngle


Index