Question [resolved]: how to use reverse attribute in move_to

The place to discuss scripting and game modifications for X4: Foundations.

Moderators: Scripting / Modding Moderators, Moderators for English X Forum

haiontop
Posts: 2
Joined: Sun, 14. Apr 19, 11:30

Question [resolved]: how to use reverse attribute in move_to

Post by haiontop »

I'm trying to make a mod to destroyer & battleship fight behavior, I would like to have the losing ship move backward away slowly instead of exposing its engine to incoming missile barrage.

Resolved, as long as all the position is in same space then move_to works for small distance.
Though I find that speed cap is not implemented so ship can move backward at negative max forward speed.
I'm enforcing it by <interrupt_after_time time="1s"/> but now wondering if I'd prefer that :D
Last edited by haiontop on Tue, 23. Apr 19, 13:20, edited 2 times in total.
haiontop
Posts: 2
Joined: Sun, 14. Apr 19, 11:30

Re: Question: how to use reverse attribute in move_to

Post by haiontop »

Uh apparently I did not understood the difference sector and zone. Trying again with all coordinate referenced by sector.
Btw this is pretty useful for debugging position:

Code: Select all

<do_if value="$nav?"><destroy_object object="$nav"/></do_if>
<do_if value="this.ship.isplayerowned"><create_object name="$nav" macro="macro.env_deco_nav_beacon_t1_macro" sector="this.sector" owner="faction.player"><position value="$pos"/></create_object></do_if>

<on_abort>
        <do_if value="$nav?"><destroy_object object="$nav"/></do_if>
</on_abort>
albysmith
Posts: 37
Joined: Thu, 6. Dec 18, 14:57
x4

Re: Question: how to use reverse attribute in move_to

Post by albysmith »

https://discord.gg/e4qmmJT A lot of the mod people hang around here if you have any more trouble.

Return to “X4: Foundations - Scripts and Modding”