Object
Noir.Classes.ObjectClass: NoirClass
Represents a Stormworks object.
Initializes object class objects.
Parameters
ID
: integer
Serializes this object into g_savedata format.
Used internally. Do not use in your code.
Returns
NoirSerializedObject
Deserializes this object from g_savedata format.
Used internally. Do not use in your code.
Parameters
serializedObject
: NoirSerializedObject
Returns
NoirObject
Returns the data of this object.
Returns
SWObjectData|nil
Returns whether or not this object is simulating.
Returns
boolean
Returns whether or not this object exists.
Returns
boolean
Despawn this object.
Get this object's position.
Returns
SWMatrix
Teleport this object.
Parameters
position
: SWMatrix
Revive this character (if character).
Set this object's data (if character).
Parameters
hp
: numberinteractable
: booleanAI
: boolean
Returns this character's health (if character).
Returns
number
Set this character's/creature's tooltip (if character or creature).
Parameters
tooltip
: string
Set this character's AI state (if character).
Parameters
state
: integer - Ship Pilot: 0 = none, 1 = path to destination Heli Pilot: 0 = None, 1 = path to destination, 2 = path to destination (accurate), 3 = gun run Plane Pilot: 0 = none, 1 = path to destination, 2 = gun run Gunner: 0 = none, 1 = fire at target Designator: 0 = none, 1 = aim at target
Returns this character's AI target (if character).
Returns
NoirAITarget|nil
Set this character's AI character target (if character).
Parameters
target
: NoirObject
Set this character's AI body target (if character).
Parameters
body
: NoirBody
Set this character's AI position target (if character).
Parameters
position
: SWMatrix
Kills this character (if character).
Returns the vehicle this character is sat in (if character).
Returns
NoirBody|nil
Returns the item this character is holding in the specified slot (if character).
Parameters
slot
: SWSlotNumberEnum
Returns
integer|nil
Give this character an item (if character).
Parameters
slot
: SWSlotNumberEnumequipmentID
: SWEquipmentTypeEnumisActive
: boolean|nilint
: integer|nilfloat
: number|nil
Returns whether or not this character is downed (dead, incapaciated, or hp <= 0) (if character).
Returns
boolean
Seat this character in a seat (if character).
Parameters
body
: NoirBodyname
: string|nilvoxelX
: integer|nilvoxelY
: integer|nilvoxelZ
: integer|nil
Set the move target of this character (if creature).
Parameters
position
: SWMatrix
Damage this character by a certain amount (if character).
Parameters
amount
: number
Heal this character by a certain amount (if character).
Parameters
amount
: number
Get this fire's data (if fire).
Returns
boolean
: isLit
Set this fire's data (if fire).
Parameters
isLit
: booleanisExplosive
: boolean
Last updated