Script Request: Mass Home basing

The place to discuss scripting and game modifications for X²: The Threat.

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

aikjo2
Posts: 70
Joined: Fri, 6. Jan 06, 01:35
x4

Script Request: Mass Home basing

Post by aikjo2 »

could someone write a script that changes the homebase of every (player owned) ship docked at (THIS) object to (THIS) object

i was wondering how to make a script that i would allow me to issue a command to my carrier that changes the homebase of everything docked at it to the carrier.

any help will be greatly appreciated.
Eagles May Soar,
But rabbits don't get sucked into jet engines.
User avatar
Burianek
Posts: 2981
Joined: Mon, 29. Dec 03, 03:29
x3tc

Post by Burianek »

There are scripting tutorials listed in the tutorials sticky above.
That may help you write the script.
Cheers.
"Nature's first green is gold" . . . stay golden.
User avatar
Serial Kicked
Posts: 3823
Joined: Fri, 12. Aug 05, 20:46
x3tc

Post by Serial Kicked »

Here's the method I use in my carrier commands script.

Code: Select all

001  $shiparray = [THIS] -> get ship array from sector/ship/station
002   $nb =  size of array $shiparray
003   $x = 0
004   while $x < $nb
005    $ship = $shiparray[$x]
006    $ship -> set homebase to [THIS]
007 @  = wait 10 ms
008    inc $x = 
009   end
010   return null
Where [THIS] is the carrier/station you want to use as a homebase.
X3:TC/AP Pirate Guild 3 - Yaki Armada 2 - Anarkis Defense System

Anarkis Gaming HQ
Independent Game Development
X3 Scripting and Modding Station
aikjo2
Posts: 70
Joined: Fri, 6. Jan 06, 01:35
x4

Post by aikjo2 »

ty i will try it out
Eagles May Soar,
But rabbits don't get sucked into jet engines.

Return to “X²: The Threat - Scripts and Modding”