This command gets the distance between two position arrays.
<RetVar> = The 'variable' storing the returned integer.
<Var/Array> = The 'variable' storing the position array. Since two are used they must both use different variable names.
Example :
* the player has two stations in the same sector
* get the first 'Object' position array
$Object1 = [THIS] get user input without sector: type={Var/Ship/Station owned by Player}, title='Station 1'
$Position1 = $Object1->get position as array
* get the second 'Object' position array
$Object2 = [THIS] get user input without sector: type={Var/Ship/Station owned by Player}, title='Station 2'
$Position2 = $Object2->get position as array
* get the distance between the two
$Distance = get distance: position array1=$Position1 array2=$Position2
* output Distance to player logbook
write to player logbook $Distance
return null
The logbook output is in this format : 34745
Related Commands :
<RefObj> ->get distance to: array=<Var/Array>
<RefObj> ->get position as array
Command Location :
- »General Object Commands
<RetVar> = get distance: position array1=<Var/Array> array2=<Var/Array>