VoidExpanse/scope-game
Scope game
Used for various in-game functions.
Visibility: Global.
List of functions
| ApplyForceToObject | ||
|---|---|---|
| Arguments | Returns | Example |
|
void |
game.ApplyForceToObject(153, 10, 0); // add x-axis force |
| Description | ||
|
Applies force to physics object. Will work on any interactive object. | ||
| ApplyTorqueToObject | ||
|---|---|---|
| Arguments | Returns | Example |
|
void |
game.ApplyTorqueToObject(153, 10); // add torque |
| Description | ||
|
Applies torque to physics object. Will work on any interactive object. | ||
| DamageProjectile | ||
|---|---|---|
| Arguments | Returns | Example |
|
void |
game.DamageProjectile(1, 12, 10); |
| Description | ||
|
Damages projectile. Projectile, that took enough damage, will explode. | ||
| TryToRemoveContentFromAsteroid | ||
|---|---|---|
| Arguments | Returns | Example |
|
int: amount of content extracted from asteroid |
game.TryToRemoveContentFromAsteroid(12, "ResourceOre", 10); |
| Description | ||
|
Tries to remove specified resource from asteroid's contents. Returns extracted amount. | ||
| GetItemEffects | ||
|---|---|---|
| Arguments | Returns | Example |
|
array of objects:
|
var effects = game.GetItemEffects("SomeItem");
|
| Description | ||
|
Returns an array of all effects of specified item. | ||
| GetItemPrice | ||
|---|---|---|
| Arguments | Returns | Example |
|
int: item_price |
var price = game.GetItemPrice("SomeItem");
|
| Description | ||
| GetItemSID | ||
|---|---|---|
| Arguments | Returns | Example |
|
string: xml_item_id |
var xml_item_id = game.GetItemSID(12352); |
| Description | ||
|
Returns xml_id of item by it's instance ID. | ||
| GetProjectileDescriptionByXmlID | ||
|---|---|---|
| Arguments | Returns | Example |
|
object:
|
var xml_item_id = game.GetProjectileDescriptionByXmlID("wpn_0");
|
| Description | ||
|
Gets projectile description. Projectile xml ID is constructed by the following rule: wpn_id + "_" + projectile_order (starting with 0). | ||
| GetSecondsMultiplier | ||
|---|---|---|
| Arguments | Returns | Example |
|
void |
void |
var multiplier = game.GetSecondsMultiplier(); |
| Description | ||
|
Returns time passed since last frame. Useful when calculating time-depended stuff, like health-regeneration or damage. | ||
| GetGameObjectTags | ||
|---|---|---|
| Arguments | Returns | Example |
|
void |
var tags = game.GetGameObjectTags(131); |
| Description | ||
|
Gets game object tags. Any physical object, such as asteroid, space object, ship or else, has it's own tags. This function can retrieve it. Alias of game.GetTags. | ||
| GetTags | ||
|---|---|---|
| Arguments | Returns | Example |
|
void |
var tags = game.GetTags(131); |
| Description | ||
|
Gets game object tags. Any physical object, such as asteroid, space object, ship or else, has it's own tags. This function can retrieve it. The same as game.GetGameObjectTags. | ||
| GetShipOwner | ||
|---|---|---|
| Arguments | Returns | Example |
|
string: owner_name |
var name = game.GetShipOwner(123142); |
| Description | ||
|
Returns name of ship's owner. If ship is npc-controller, that would be npc name, else - player's name. | ||
| GetAsteroidMiningListByID | ||
|---|---|---|
| Arguments | Returns | Example |
|
array of objects:
|
var list = game.GetAsteroidMiningListByID(1252); |
| Description | ||
|
Returns actual ateroid mining list. | ||
| GetAsteroidDescriptionByID | ||
|---|---|---|
| Arguments | Returns | Example |
|
object:
|
var desc = game.GetAsteroidDescriptionByID(1252); |
| Description | ||
|
Returns asteroid description. | ||
| GetSkillEffects | ||
|---|---|---|
| Arguments | Returns | Example |
|
array of objects:
|
var effects = game.GetSkillEffects("SomeSkill");
|
| Description | ||
|
Returns array of specified skills' effects. | ||
| IsResource | ||
|---|---|---|
| Arguments | Returns | Example |
|
bool: is specified item resource |
var is_res = game.IsResource("SomeItemOrResource");
|
| Description | ||
| IsHull | ||
|---|---|---|
| Arguments | Returns | Example |
|
bool: is specified item is hull |
var is_hull = game.IsHull("SomeItemOrResource");
|
| Description | ||
| IsDevice | ||
|---|---|---|
| Arguments | Returns | Example |
|
bool: is specified item is device |
var is_dev = game.IsDevice("SomeItemOrResource");
|
| Description | ||
| IsWeapon | ||
|---|---|---|
| Arguments | Returns | Example |
|
bool: is specified item is weapon |
var is_wpn = game.IsWeapon("SomeItemOrResource");
|
| Description | ||
| IsShipPlayerControlled | ||
|---|---|---|
| Arguments | Returns | Example |
|
bool: is ship controlled by player |
var is_player = game.IsShipPlayerControlled(123252); |
| Description | ||
| GetSystemJumpgates | ||
|---|---|---|
| Arguments | Returns | Example |
|
array: IDs of system jumpgates |
var jumpgates = game.GetSystemJumpgates(1); |
| Description | ||
|
Returns all jumpgates of specified system. | ||
| GetSystemBases | ||
|---|---|---|
| Arguments | Returns | Example |
|
array: IDs of system bases |
var bases = game.GetSystemBases(1); |
| Description | ||
|
Returns all bases of specified system. | ||
| GetSystemShips | ||
|---|---|---|
| Arguments | Returns | Example |
|
array: IDs of system ships |
var ships = game.GetSystemShips(1); |
| Description | ||
|
Returns all ships of specified system. | ||
| GetSystemShipsOfClass | ||
|---|---|---|
| Arguments | Returns | Example |
|
array: IDs of system ships |
var miner_ships = game.GetSystemShipsOfClass(1, "miner"); |
| Description | ||
|
Returns all ships of specified system, which tag "class" is equal to specified value. | ||
| GetSystemPlayersShips | ||
|---|---|---|
| Arguments | Returns | Example |
|
array: IDs of system players' ships |
var ships = game.GetSystemPlayersShips(1); |
| Description | ||
|
Returns all player-controlled ships of specified system. | ||
| GetObjectCoordinates | ||
|---|---|---|
| Arguments | Returns | Example |
|
vector2: coordinates |
var coords = game.GetObjectCoordinates(1, 25442); |
| Description | ||
|
Returns coordinates of specified object. | ||
| DeleteGameObject | ||
|---|---|---|
| Arguments | Returns | Example |
|
void |
game.DeleteGameObject(25442); |
| Description | ||
|
Deletes game object from game world. | ||
| GetBaseEntryPointsByID | ||
|---|---|---|
| Arguments | Returns | Example |
|
array of vector2 |
var points = game.GetBaseEntryPointsByID(353); |
| Description | ||
|
Returns bases' actual entry points coordinates. | ||
| SetSecondsBetweenStarSystemUpdates | ||
|---|---|---|
| Arguments | Returns | Example |
|
void |
game.SetSecondsBetweenStarSystemUpdates(1, 60); |
| Description | ||
|
Sets interval between event "OnStarSystemUpdate" for this system calls. | ||
| SendNotification | ||
|---|---|---|
| Arguments | Returns | Example |
|
void |
game.SendNotification("dlirry", "Server notification", "You are great player!");
|
| Description | ||
|
Sends notification to connected player. | ||