Body
Noir.Classes.BodyClass: NoirClass
Represents a body which is apart of a vehicle.
In Stormworks, this is actually a vehicle apart of a vehicle group.
Initializes body class objects.
Parameters
ID
: anyowner
: NoirPlayer|nilspawnPosition
: SWMatrixcost
: numberloaded
: boolean
Serialize the body.
Used internally.
Returns
NoirSerializedBody
Deserialize the body.
Used internally.
Parameters
serializedBody
: NoirSerializedBodysetParentVehicle
: boolean|nil
Returns
NoirBody|nil
Returns the position of this body.
Parameters
voxelX
: integer|nilvoxelY
: integer|nilvoxelZ
: integer|nil
Damage this body at the provided voxel.
Parameters
damageAmount
: numbervoxelX
: integervoxelY
: integervoxelZ
: integerradius
: number
Makes the body invulnerable/vulnerable to damage.
Parameters
invulnerable
: boolean
Makes the body editable/non-editable (dictates whether or not the body can be brought back to the workbench).
Parameters
editable
: boolean
Teleport the body to the specified position.
Parameters
position
: SWMatrix
Move the body to the specified position. Essentially teleports the body without reloading it.
Rotation is ignored.
Parameters
position
: SWMatrix
Set a battery's charge (by name).
Parameters
batteryName
: stringamount
: number
Set a battery's charge (by voxel).
Parameters
voxelX
: integervoxelY
: integervoxelZ
: integeramount
: number
Set a hopper's amount (by name).
Parameters
hopperName
: stringamount
: numberresourceType
: SWResourceTypeEnum
Set a hopper's amount (by voxel).
Parameters
voxelX
: integervoxelY
: integervoxelZ
: integeramount
: numberresourceType
: SWResourceTypeEnum
Set a keypad's value (by name).
Parameters
keypadName
: stringvalue
: number
Set a keypad's value (by voxel).
Parameters
voxelX
: integervoxelY
: integervoxelZ
: integervalue
: number
Set a seat's values (by name).
Parameters
seatName
: stringaxisPitch
: numberaxisRoll
: numberaxisUpDown
: numberaxisYaw
: numberbutton1
: booleanbutton2
: booleanbutton3
: booleanbutton4
: booleanbutton5
: booleanbutton6
: booleantrigger
: boolean
Set a seat's values (by voxel).
Parameters
voxelX
: integervoxelY
: integervoxelZ
: integeraxisPitch
: numberaxisRoll
: numberaxisUpDown
: numberaxisYaw
: numberbutton1
: booleanbutton2
: booleanbutton3
: booleanbutton4
: booleanbutton5
: booleanbutton6
: booleantrigger
: boolean
Set a weapon's ammo count (by name).
Parameters
weaponName
: stringamount
: number
Set a weapon's ammo count (by voxel).
Parameters
voxelX
: integervoxelY
: integervoxelZ
: integeramount
: number
Set this body's transponder activity.
Parameters
isActive
: boolean
Set a tank's contents (by name).
Parameters
tankName
: stringamount
: numberfluidType
: SWTankFluidTypeEnum
Set a tank's contents (by voxel).
Parameters
voxelX
: integervoxelY
: integervoxelZ
: integeramount
: numberfluidType
: SWTankFluidTypeEnum
Set whether or not this body is shown on the map.
Parameters
isShown
: boolean
Reset this body's state.
Set this body's tooltip.
Parameters
tooltip
: string
Get a battey's data (by name).
Parameters
batteryName
: string
Returns
SWVehicleBatteryData|nil
Get a battey's data (by voxel).
Parameters
voxelX
: integervoxelY
: integervoxelZ
: integer
Returns
SWVehicleBatteryData|nil
Get a button's data (by name).
Parameters
buttonName
: string
Returns
SWVehicleButtonData|nil
Get a button's data (by voxel).
Parameters
voxelX
: integervoxelY
: integervoxelZ
: integer
Returns
SWVehicleButtonData|nil
Get this body's components.
Returns
SWLoadedVehicleData|nil
Get this body's data.
Returns
SWVehicleData|nil
Get a dial's data (by name).
Parameters
dialName
: string
Returns
SWVehicleDialData|nil
Get a dial's data (by voxel).
Parameters
voxelX
: integervoxelY
: integervoxelZ
: integer
Returns
SWVehicleDialData|nil
Returns the number of surfaces that are on fire.
Returns
integer|nil
Get a hopper's data (by name).
Parameters
hopperName
: string
Returns
SWVehicleHopperData|nil
Get a hopper's data (by voxel).
Parameters
voxelX
: integervoxelY
: integervoxelZ
: integer
Returns
SWVehicleHopperData|nil
Get a rope hook's data (by name).
Parameters
hookName
: string
Returns
SWVehicleRopeHookData|nil
Get a rope hook's data (by voxel).
Parameters
voxelX
: integervoxelY
: integervoxelZ
: integer
Returns
SWVehicleRopeHookData|nil
Get a seat's data (by name).
Parameters
seatName
: string
Returns
SWVehicleSeatData|nil
Get a seat's data (by voxel).
Parameters
voxelX
: integervoxelY
: integervoxelZ
: integer
Returns
SWVehicleSeatData|nil
Get a sign's data (by name).
Parameters
signName
: string
Returns
SWVehicleSignData|nil
Get a sign's data (by voxel).
Parameters
voxelX
: integervoxelY
: integervoxelZ
: integer
Returns
SWVehicleSignData|nil
Get a tank's data (by name).
Parameters
tankName
: string
Returns
SWVehicleTankData|nil
Get a tank's data (by voxel).
Parameters
voxelX
: integervoxelY
: integervoxelZ
: integer
Returns
SWVehicleTankData|nil
Get a weapon's data (by name).
Parameters
weaponName
: string
Returns
SWVehicleWeaponData|nil
Get a weapon's data (by voxel).
Parameters
voxelX
: integervoxelY
: integervoxelZ
: integer
Returns
SWVehicleWeaponData|nil
Presses a button on this body (by name).
Parameters
buttonName
: string
Presses a button on this body (by voxel).
Parameters
voxelX
: integervoxelY
: integervoxelZ
: integer
Despawn the body.
Returns whether or not the body exists.
Returns
boolean
Returns whether or not the body is simulating.
Returns
boolean
Last updated