I've fully written an FTL jumping system (based on paulps 2p2 jump script, but in fact there is not much paulps code already =)). Ad I have a problem to be solved, maybe someone will give me some tip!
So here's a final part of the code of a main plugin:
* Sending warning:
$strtime = 'X seconds until jump!'
if [THIS] == [PLAYERSHIP]
$classtime = convert number $w8count to string
$strtime = substitute in string $strtime: pattern 'X' with $classtime
display subtitle text: text=$strtime duration=2000 ms
end
* Counting:
while $w8count > 0
= wait 1000 ms
dec $w8count
end
* Command using check
skip if [THIS]-> get command
[THIS]-> set command: [COMMAND_FTL_JUMP]
* Executing the jump
[THIS]-> put into environment $target.sector->
* Setting ship position in the sector
[THIS]-> set position: x=$x y=$y z=$z
* Removing needed fuel from cargobay
$nfuel = -$nfuel
= [THIS]-> add $nfuel units of {Tylium fuel}
* END
return null
$strtime = 'X seconds until jump!'
if [THIS] == [PLAYERSHIP]
$classtime = convert number $w8count to string
$strtime = substitute in string $strtime: pattern 'X' with $classtime
display subtitle text: text=$strtime duration=2000 ms
end
* Counting:
while $w8count > 0
= wait 1000 ms
dec $w8count
end
* Command using check
skip if [THIS]-> get command
[THIS]-> set command: [COMMAND_FTL_JUMP]
* Executing the jump
[THIS]-> put into environment $target.sector->
* Setting ship position in the sector
[THIS]-> set position: x=$x y=$y z=$z
* Removing needed fuel from cargobay
$nfuel = -$nfuel
= [THIS]-> add $nfuel units of {Tylium fuel}
* END
return null
As you can see, the feature is to get rid of vanilla jumpdrive and ecells. But, as far as I know, the command "use jump drive: target=$Value" is hardcoded and can be called only with Jumpdriveonboard and will take some ecells anyway. In this case I had to use "[THIS]-> put into environment $target.sector->" this one... In fact it's doing same to "use jump drive: target=$Value", but without any wares required. But using this command causes (for some mysterious for me reason) an issue with the next command "[THIS]-> set position: x=$x y=$y z=$z"...
In fact after the jump ship appears at the center of the sector and that's all. Nothing happens, it doesn't move anywhere... Seems like next line was not executed, but it's impossible + script takes correct amount of "{Tylium fuel}" which should be executed after moving command. Another fact is that if you use the FTL drive in the same sector ship jumps to correct coordinates!
And I've tried both "set position" and "force position" commands, nothing happens. But if you place a vanilla "Use jumpdrive..", all seems to work.
Any help would be appreciated!
P.S. Sorry for my terrible English, it's not my native language =( Aslo code tags were not working for some reasons, so I had to paste the code as you can see it atm(