[Coding] Very strange bug concerning new ships

The place to discuss scripting and game modifications for X³: Terran Conflict and X³: Albion Prelude.

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

Post Reply
User avatar
Joubarbe
Posts: 4796
Joined: Tue, 31. Oct 06, 12:11
xr

[Coding] Very strange bug concerning new ships

Post by Joubarbe » Sat, 21. Jun 14, 18:37

Hello,

I've got this code :

Code: Select all

$Target.Ship = [THIS]-> call script 'xmr.prepare.ship' : NeededClass=null NeededType=$Target.Type NeededRace=[Pirates] Sector=$CounterWave.StartSector PosX=$PosX PosY=$PosY PosZ=$PosZ MaxTuningOffset=0 ShipCustomName=$Target.Name ShipNameColor=null

$RandomConqueredSector.Outpost = find station: sector=$RandomConqueredSector class or type={Argon Military Outpost} race=[Argon] flags=0 refobj=null maxdist=0 maxnum=0 refpos=null

START $Target.Ship-> call script '!fight.attack.object' : victim=$RandomConqueredSector.Outpost follow=0 onlyShields=[FALSE]

*debug
$Target.Ship -> set owner race to [Pirates]
$Target.Ship.Race = $Target.Ship -> get owner race
write to player logbook $Target.Ship.Race
That's supposed to create pirate ships, and I've used this custom "library" in many scripts before, with no problem. Only this time, at Brennan's Triumph, every ship appears with random owner, but none of them are pirates. Even with the *debug part, it still indicates random owner races in my logbook instead of pirates (random being Argon, Boron, Teladi, Paranid, Split).

What I did in this game was to change the owner race of the sector, and create an Outpost... (so it's no more pirates, it's Argon)

I'm running on Litcube Universe, with no biggy scripts.

UniTrader
Moderator (Script&Mod)
Moderator (Script&Mod)
Posts: 14571
Joined: Sun, 20. Nov 05, 22:45
x4

Post by UniTrader » Sat, 21. Jun 14, 21:28

they are actually pirates, they just hide themselves ;) try to scan them ;)


if you dont want this behavior there is a Command like "$object -> set pirate cover state to [[TRUE]|[FALSE]" ;)
if not stated otherwise everything i post is licensed under WTFPL

Ich mache keine S&M-Auftragsarbeiten, aber wenn es fragen gibt wie man etwas umsetzen kann helfe ich gerne weiter ;)

I wont do Script&Mod Request work, but if there are questions how to do something i will GLaDly help ;)

User avatar
Joubarbe
Posts: 4796
Joined: Tue, 31. Oct 06, 12:11
xr

Post by Joubarbe » Sat, 21. Jun 14, 22:40

Wow, I completely forgot that... And my attack order was buggy so I was guessing for something weird...

Well, thank you ! :)

Post Reply

Return to “X³: Terran Conflict / Albion Prelude - Scripts and Modding”