[REQ: BUG FIX] guns activate on ship => that ship stops boosting

The place to discuss scripting and game modifications for X Rebirth.

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

swatti
Posts: 1278
Joined: Sun, 7. Dec 03, 12:03
x4

[REQ: BUG FIX] guns activate on ship => that ship stops boosting

Post by swatti »

Sometimes when ships arrive to sector boosting and are under orders to attack something they won't stop boosting and fly sideways, backwards, etc looking dumb...

I was wondering if it was possible to link the guns going red into stop boosting.
Having the command repeat might cause ships to drop boosting while flying by enemies but I consider that VERY small issue compared to ships boosting all over the place.
Also, setting a ship to defend instead of attacking would let ships boost by enemies unless they attack and cause retaliation, in which case "sure, let's get it on"

So, question is, can activating guns be linked into stop boosting?
Sparky Sparkycorp
Moderator (English)
Moderator (English)
Posts: 8074
Joined: Tue, 30. Mar 04, 12:28
x4

Post by Sparky Sparkycorp »

This sounds like it could be quite dangerous/odd-looking for trading ships trying to boost to other zones if there are hostiles around. Was that something that you had taken into consideration?
swatti
Posts: 1278
Joined: Sun, 7. Dec 03, 12:03
x4

Post by swatti »

I was taking it in considoration actually... From the two, id rather take "trade ships dropping off boost" then "my ships flying sideways all over the place"

I did ficure out a failsafe'ish. Trade ships should be on "defencive" and attack ONLY to retaliate. In this case they would drop boost only if attacked... Kinda fits when you think it. They now just run off getting full shields while boosting off... What can a legimate genociding madman do against that? ^^

Jeah, may end up being bit harder to then it sounds but "can it be done" ? Or is there another good solution to stop ships boosting in combat.
bm01
Posts: 421
Joined: Wed, 22. Jul 09, 22:31
x4

Re: [REQ: BUG FIX] guns activate on ship => that ship stops boosting

Post by bm01 »

swatti wrote:So, question is, can activating guns be linked into stop boosting?
Yes.

But it's not directly related to turrets, which are controlled by the Defense Officer and are completely independent from how the ship moves. For example, a ship with a "hold position" command can shoot back but will not move at all (which is kind of silly but whatever). Also, unless I'm missing something, this "bug" doesn't happen for traders or miner unless you explicitly ask them to attack while they're boosting.

The "stop boosting" should be done as soon as a fight maneuver is initiated. Currently when "fight.attack.object" starts and previous scripts are aborted and the boost doesn't stop, that is the core of the problem.

The most elegant way of dealing with that would be to put a stop boost command in the "on_abort" node of "move.generic". Or in any script that can initiate a boost.

I suppose that would work.
Last edited by bm01 on Fri, 24. Oct 14, 18:01, edited 1 time in total.
swatti
Posts: 1278
Joined: Sun, 7. Dec 03, 12:03
x4

Post by swatti »

As my scripting knowledge and understanding is nearly zero im just throwing out ideas, most likely, very bad ones.

In simplicity: What does it need to fix this issue? How hard is it? Could somone here do it?

Return to “X Rebirth - Scripts and Modding”