(I seem to have forgotten....)
e.g. If it already has a priority 0, script on task 0
How can I make it run a different one?
(I tried everything


Moderators: Scripting / Modding Moderators, Moderators for English X Forum
Code: Select all
$Numbers = array alloc: size=6
$Numbers[0] = 4
$Numbers[1] = 2
$Numbers[2] = 24
$Numbers[3] = 6
$Numbers[4] = 12
$Numbers[5] = 1
$Numbers = sort array $Numbers
write to player logbook $Numbers
Code: Select all
$Numbers = sort array: data=$Numbers sort values=$Numbers
Code: Select all
= wait 1000 ms
$NSBTS = get global variable: name='naval.shuffle.bts'
if not $NSBTS
START [THIS]->call script 'Naval.Shuffle.BuyTerranStations' :
set global variable: name='naval.shuffle.bts' value=$NSBTS
else
return null
end
= wait 1000 ms
$NSFDS = get global variable: name='naval.shuffle.fds'
if not $NSFDS
START [THIS]->call script 'Naval.Shuffle.FixDronesSats' :
set global variable: name='naval.shuffle.fds' value=$NSFDS
else
return null
end
= wait 1000 ms
$NS204 = get global variable: name='naval.shuffle.204'
if not $NS204
START [THIS]->call script 'Naval.Shuffle.FixTech204' :
set global variable: name='naval.shuffle.204' value=$NS204
else
return null
end
= wait 1000 ms
$NSSFF = get global variable: name='naval.shuffle.sff'
if not $NSSFF
START [THIS]->call script 'Naval.Shuffle.SplitFoodFix' :
set global variable: name='naval.shuffle.sff' value=$NSSFF
else
return null
end
= wait 1000 ms
return null
Code: Select all
= wait 1000 ms
$Playtime = playing time
if $Playtime <= 30
START [THIS]->call script 'Naval.Shuffle.BuyTerranStations' :
= wait 1000 ms
START [THIS]->call script 'Naval.Shuffle.FixDronesSats' :
= wait 1000 ms
START [THIS]->call script 'Naval.Shuffle.FixTech204' :
= wait 1000 ms
START [THIS]->call script 'Naval.Shuffle.SplitFoodFix' :
else if $Playtime >= 30
return null
end
return null
Code: Select all
$NSBTS = get global variable: name='naval.shuffle.bts'
if not $NSBTS
START [THIS]->call script 'Naval.Shuffle.BuyTerranStations' :
set global variable: name='naval.shuffle.bts' value=$NSBTS
else if $NSBTS
return null
end
Code: Select all
set global variable: name='naval.shuffle.bts' value=TRUE
Code: Select all
Input:
1: alpha , Var/Number , 'Angle alpha (0-65536)' - Angle Alpha (Number from 0 to 65536)
2: beta , Var/Number , 'Angle beta (0-65536)' - Angle Beta (Number from 0 to 65536) (use Alpha & Beta of a Ship to get a position in front or behind of it )
3: dis , Var/Number , 'Distance in m' - Like the Text says - the Dinstance from the RefPos ^^ (when use with Ships: Positive Int -> in front of a Ship, Negative Int -> behind a ship )
4: pos0.arr , Value , 'position array' - RefPos as X3-Position-Array (IF null THEN RefPos = 0/0/0) ; Improvement by Gazz: you can use an Object as RefPos. In this case there are no alpha- and beta-angles necessary, they will be taken from the RefObj
Output:
ARRAY ( X , Y , Z ) X3-Position array
s9ilent wrote:let dy dy dz = the displacement (for x y z)
let Dist1 = sqrt (dx^2 + dy^2)
let dist2 = sqrt (dist1^2 + dz ^2)
cos alpha = dy / dist1
alpha = arccos ( dy / dist1 )
cos beta = dist1 / dist2
beta = arccos ( dist1 / dist2 )