Basic table for a static object
local staticObj = {
["heading"] = 0,
["groupId"] = 3,
["shape_name"] = "stolovaya",
["type"] = "Cafe",
["unitId"] = 3,
["rate"] = 100,
["name"] = "dynBuilding",
["category"] = "Fortifications",
["y"] = 621528.57142856,
["x"] = -294100,
["dead"] = false,
}
coalition.addStaticObject(country.id.USA, staticObj)
Required values
name string for the static object name
type string for the type of object
x number for x coordinate
y number for y coordinate
Optional Values
dead boolean for whether or not the object will appear as a wreck
rate number value for the "score" of the object when it is killed
groupId number groupId
unitId number unitId
heading number heading of the object in radians
linkOffset boolean for whether or not the static object will be attached to a ship.
linkUnit number unitId corresponding to the ship that the offset is based off of.
offsets table defining the position and orientation of the static object relative to the center of the offset unit. Table is simply in the format: {x, y, angle}
Cargo Object values
mass number how much the cargo object will weigh. Some cargo objects have fixed mass
canCargo boolean for whether or not the cargo object can be lifted
Aircraft and Helicopter values
livery_id string name of the livery for the aircraft
|