Code: Select all
$env = $ship->get environment
if $env != [THIS]
$ship->start task 0 with script '!ship.cmd.retreat.std' and prio 0: arg1=$carrier arg2=null arg3=null arg4=null arg5=null
else if $env == [THIS]
gosub dodock
remove element from array $ship.list at index $ship.count
continue
end
Code: Select all
$env = $ship->get environment
if not $env == [THIS] OR $ship->is script '!ship.cmd.retreat.std' on stack of task=0
$ship->start task 0 with script '!ship.cmd.retreat.std' and prio 0: arg1=$carrier arg2=null arg3=null arg4=null arg5=null
else if $env == [THIS]
gosub dodock
remove element from array $ship.list at index $ship.count
continue
end
:edit:
Since it's supposed to be defense grid only, I might have no clue. I don't suppose anyone knows where I should look to fix bugs like that?