Ship_setShieldsValue(string shipid, int region, float percentage)
Changes the ship's shield region, as a percentage (between 0 and 1). Region must be one of
- SHIPAREA_FRONT
- SHIPAREA_BACK
- SHIPAREA_LEFT
- SHIPAREA_RIGHT
since 1.4
float Ship_getShieldsValue(string shipid, int region)
Returns the current ship's shield region as a percentage (between 0 and
1). If shipid doesn't exist, returns nil. Region must be one of
- SHIPAREA_FRONT
- SHIPAREA_BACK
- SHIPAREA_LEFT
- SHIPAREA_RIGHT
since 1.4
Ship_setShieldsAll(string shipid, float percentage)
Changes all the ship's shields regions to a percentage value (between 0 and 1).
since 1.4
Ship_setArmorAll(string shipid, float percentage)
Changes all the ship's armor regions to a percentage value (between 0 and 1).
since 1.4
Ship_jumpOut(string shipid)
The ship jumps out.
since 1.4
Ship_jumpIn(string shipid)
The ship jumps in. This must be called immediately after Mission_addShip if it is called at all.
since 1.4
Ship_remove(string shipid)
Similar to Ship_destroy, except that this function does not show
an explosion, and kill counts are not affected. The ship's on
kill function will also not be called.
since 1.4
Ship_setMaxVelocity(string shipid, float value);
Changes the ship's maximum velocity. This should really only be
used for cutscenes. If this function is not called, this ship's
maximum velocity is limited by its xml file's value.
since 1.4
Ship_setVisible(string shipid, bool visible);
This should only be used by cutscenes. It is primarily used to force
the engine to render a ship, or to temporarily hide a ship during
placement or movement in a cutscene. Do not attempt to implement
cloaking with this.
since 1.4
Ship_setLandOn(string shipid, bool landon);
True if this will be the ship the player can land on. Usually used with scriptcontrol mode.
This allows the ship to have a request landing comm, and to do the landing if you bump into it.
Can only be used on capital ships.
since 1.6
Wing_create(string shipid_wingleader)
Creates a wing, with the wingleader given by the shipid of
shipid_wingleader. The wingleader's shipid will be used to
identify the wing.
A wing should be created and completely filled out at the nav point's
entry function. Only friendly wings should be created.
This must only be used with scriptcontrol.
since 1.7
Wing_addWingman(string shipid_wingleader, string shipid_wingman)
Adds a wingman to a wing.
A wing should be created and completely filled out at the nav point's
entry function. Only friendly wings should be created.
This must only be used with scriptcontrol.
since 1.7
Wing_removeWingman(string shipid_wingleader, string shipid_wingman)
This should be used if a wingman is not autopiloting to the next nav point. Typically used in a nav's exit function.
This must only be used with scriptcontrol.
since 1.7
Wing_setName(string shipid_wingleader, string name)
When a player pulls up the comm menu, part of the menu displays the
wing name. The default wing name is "Alpha". This allows
you to change
the wing name that is displayed. shipid_wingleader should be the player's shipid.
since 1.7
Wing_setFormation(string shipid_wingleader, int formationnumber)
By default, friendly wings will use formation 0 as defined in the
formations.xml file. Use this function
to change the formation used. The formationnumber is
the 0-indexed formation within the formations.xml file.
Each wing can now have its own formation.
since 1.7
Wing_setAutopilotOffset(string shipid_wingleader, float x, float y, float z)
This only needs to be called for friendly wings that are not the player's wing.
It only affects autopilot cutscenes.
x, y, z, : The offset of this wing's leader with respect to the player's location.
since 1.7