API:EShipDirection

From STNE Wiki

Revision as of 21:22, 4 May 2020 by Jacksfh (Talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search
Scripting Portal | Contents | API Reference | Index

EShipDirection is an enumerator that simplifies the navigation of ships by script. It is used exclusively as a parameter of CBaseShipManager.Fly() and is therefore suitable for flying via script even without Feature Pack.

Example

Var myShip As New CMyShip(12345);
myShip.Action.Fly(10,EShipDirection.Up);

In the example above the ship flies up 10 sectors. Instead of the EShipDirection.Up enumerator its value can be used just as well. The following code does exactly the same as the previous example

Var myShip As New CMyShip(12345);
myShip.Action.Fly(10,0);

Values

The following values are assigned for EShipDirection

Name Value
Up 0
Down 1
Left 2
Right 3

https://game.en.stne.net/objectexplorer?p=EShipDirection