Two scripting questions.

The place to discuss scripting and game modifications for X³: Reunion.

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

Post Reply
User avatar
Flic
Posts: 109
Joined: Fri, 13. Feb 04, 19:35
x3

Two scripting questions.

Post by Flic » Sat, 12. Nov 05, 12:07

Hey,

Couple of questions :)

is the a statement which returns the owner of a sector, something like

<retvar> = owner of sector <select sector>

and is there a statement which forces a ship to eject a certain amount of a ware?

Thanks.

User avatar
LV
Sith Lord
Posts: 8255
Joined: Wed, 6. Nov 02, 20:31
x3tc

Re: Two scripting questions.

Post by LV » Sat, 12. Nov 05, 13:07

Flic wrote:Hey,

Couple of questions :)

is the a statement which returns the owner of a sector, something like

<retvar> = owner of sector <select sector>

and is there a statement which forces a ship to eject a certain amount of a ware?

Thanks.

Code: Select all

$orace = $attacker -> get owner race
and to eject wares it's slightly more difficult

first you need to get the maintype and the subtype of the ware (SE Trade Menu) then create a flying ware (General Menu) at the position you want

Code: Select all

027     $main = $ware -> get maintype
028     $sub = $ware -> get subtype
031     $box =  create flying ware: maintype=$main subtype=$sub count=1 sector=$sec x=$x y=$y z=$z selfdestruct=[TRUE]

Post Reply

Return to “X³: Reunion - Scripts and Modding”