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. |
GetStationDockedNpcs | ||
---|---|---|
Arguments | Returns | Example |
|
array of int |
var npcs = game.GetStationDockedNpcs(25353); |
Description | ||
Returns an array of IDs of all ships, that are docked to a station. |
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. |
GetAllItems | ||
---|---|---|
Arguments | Returns | Example |
void |
array: xml-ids (strings) of all items |
var res = game.GetAllItems(); |
Description | ||
Gets all items. |
GetItems | ||
---|---|---|
Arguments | Returns | Example |
|
array: xml-ids (strings) of items |
var res = game.GetItems(15, ["Hull", "Consumable"]); |
Description | ||
Gets all items of specified type. |
GetItemTypes | ||
---|---|---|
Arguments | Returns | Example |
void |
array: strings of types |
var res = game.GetItemTypes(); |
Description | ||
not implemented |
GetProjectileFromSystemByID | ||
---|---|---|
Arguments | Returns | Example |
|
object:
|
var proj = game.GetProjectileFromSystemByID(15,2524); |
Description | ||
Returns basic information about specified projectile. ID in returned object is full projectile ID, which is xml_weapon_id + "_" + number_of_projectile_in_weapon. |
ProjectileFromSystemDestroy | ||
---|---|---|
Arguments | Returns | Example |
|
void |
game.ProjectileFromSystemDestroy(15,2524); |
Description | ||
Destroys specified projectile. |
ProjectileFromSystemSetSpeed | ||
---|---|---|
Arguments | Returns | Example |
|
void |
game.ProjectileFromSystemSetSpeed(15,2524, 0, 0); //stop projectile |
Description | ||
Sets projectile linear speed. Useful for manipulating projectile speed, doesn't affect it's direction. |
PlaySound | ||
---|---|---|
Arguments | Returns | Example |
|
void |
game.PlaySound("Neolog", "special/blast_sound.ogg"); |
Description | ||
Plays a special sound on a client's side for specified player. |
ShipPlaySound | ||
---|---|---|
Arguments | Returns | Example |
|
void |
game.ShipPlaySound(123, "grappler_1", "special/grappler_process.ogg", 0.1, true); |
Description | ||
Emits specified sound from specified ship. If isLooping is on, then sound must be stopped with game.ShipStopSound command. Sound_id argument must be unique inside ship's sounds and used for stopping looping sounds. |
ShipStopSound | ||
---|---|---|
Arguments | Returns | Example |
|
void |
game.ShipStopSound(123, "grappler_1"); |
Description | ||
Stops the looping sound, that was started with game.ShipPlaySound command. |