Type ShipCore
Ship Core
Methods
| addTarget( plyOrSteamID ) | Adds a target player/Steam ID to the given ship core. |
| enableEmitters( bool ) | Enables or disables any pulsar emitters under control of the given core. |
| fireRepairBeam( fire ) | Sets the repair beam to fire or not. |
| getShield() | Gets the shield assigned to the ship core. |
| getShipName() | Returns the name assigned to the ship core, if any. |
| getShipSize() | Gets the mins and maxs of the ship in co-ordinates local to the core's shield emitter. |
| getTargets() | Returns a list of all selected target Steam IDs on the ship core. |
| isTarget( plyOrSteamID ) | Returns whether the given player/Steam ID is a target. |
| platingStrength() | Returns the current strength of the ship core's plating. |
| removeTarget( plyOrSteamID ) | Removes a target player/Steam ID from the given ship core. |
| selfDestruct() | Triggers the ship core's self destruct. |
| setEnvironmentSound( soundPath, volume, pitch ) | Sets a sound that will play to the LS core environment assigned to the ship core. |
| setRepairTarget( target ) | Sets the repair beam target. |
| stopEnvironmentSound() | Stops any environment sound that was playing. |
Methods
- ShipCore:addTarget( plyOrSteamID )
-
Adds a target player/Steam ID to the given ship core.
Environment:
ServerParameters:
-
(Player | string) plyOrSteamID: The player/Steam ID to add. If a Steam ID, the corresponding player must be connected.
-
- ShipCore:enableEmitters( bool )
-
Enables or disables any pulsar emitters under control of the given core.
Environment:
ServerParameters:
-
bool: Boolean enable.
-
- ShipCore:fireRepairBeam( fire )
-
Sets the repair beam to fire or not.
Environment:
ServerParameters:
-
fire: Should the repair beam fire?
-
- ShipCore:getShield()
-
Gets the shield assigned to the ship core.
Environment:
ServerReturn value:
(Entity | Shield)The starship or Atlantis shield assigned to the ship core. - ShipCore:getShipName()
-
Returns the name assigned to the ship core, if any. The name is taken from the life support core associated with this ship core.
Environment:
Server - ShipCore:getShipSize()
-
Gets the mins and maxs of the ship in co-ordinates local to the core's shield emitter. Make sure the core has a starship or Atlantis shield, or it will return 0,0,0.
Environment:
ServerReturn values:
-
(Vector)Mins vector (local to the shield emitter). -
(Vector)Maxs vector (local to the shield emitter).
-
- ShipCore:getTargets()
-
Returns a list of all selected target Steam IDs on the ship core.
Environment:
ServerReturn values:
-
(tableThe list of selected target Steam IDs on the ship core if they are available, or nil otherwise.| nil) -
(string | nil)If the list is nil, the reason why.
-
- ShipCore:isTarget( plyOrSteamID )
-
Returns whether the given player/Steam ID is a target.
Environment:
ServerParameters:
-
(Player | string) plyOrSteamID: The player/Steam ID to check.
-
- ShipCore:platingStrength()
-
Returns the current strength of the ship core's plating.
Environment:
Server - ShipCore:removeTarget( plyOrSteamID )
-
Removes a target player/Steam ID from the given ship core.
Environment:
ServerParameters:
-
(Player | string) plyOrSteamID: The player/Steam ID to remove. If a Steam ID, the corresponding player must be connected.
-
- ShipCore:selfDestruct()
-
Triggers the ship core's self destruct. There's no going back.
Environment:
Server - ShipCore:setEnvironmentSound( soundPath, volume, pitch )
-
Sets a sound that will play to the LS core environment assigned to the ship core.
Environment:
ServerParameters:
-
soundPath: The path to the sound to play. -
volume: (Optional) The volume of the sound, between 0 and 1. Defaults to 1. -
pitch: (Optional) The pitch of the sound, between 0 and 255. Defaults to 100.
-
- ShipCore:setRepairTarget( target )
-
Sets the repair beam target.
Environment:
ServerParameters:
-
target: Entity to repair.
-
- ShipCore:stopEnvironmentSound()
-
Stops any environment sound that was playing.
Environment:
Server