System
The system object gives you access to the current system's data and lets you create new systems
Properties
| Property | Type | Description |
|---|---|---|
id |
number |
The system's id |
name |
string |
The system's name |
risk |
number |
The system's risk level |
faction |
number |
The system's faction |
jumpgatestationid |
number |
The station id of the system's jump gate |
mapcoordinate_x |
number |
The system's X coordinate on the map |
mapcoordinate_y |
number |
The system's Y coordinate on the map |
mapcoordinate_z |
number |
The system's Z coordinate on the map |
Properties are readable and writable
Methods
Create
Creates a new system and returns its id
Warning
This method can only be called inside the EarlyInit event
Args
name- The system's namex,y,z- The system's map coordinatesfaction- The system's factionrisk- The system's risk leveltextureid- The star texture idlinkedsystemid- The system id the jump gate links to. Pass-1for no jumpgate
RegisterEvent("EarlyInit", function()
local systemid = system:Create("My system", 20, 30, 21, 2, 0, 7, 2)
print("New system created, id: " .. systemid)
end)
IsVisible
Returns true if the given system is visible on the map
Args
systemid - The id of the system to check
SetVisible
Sets the visibility of a system on the map
Args
systemid- The id of the system to updatevisible-trueto show the system,falseto hide it