How to get player property in sector in script?

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

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

Post Reply
tentagon
Posts: 5
Joined: Tue, 5. Jan 10, 10:42
x3tc

How to get player property in sector in script?

Post by tentagon » Sun, 22. Jan 12, 22:52

Hi, I have one question. Is there a way to find out if player has any ship in given sector in script? I tried "get player owned ship array from sector", but it doesn't return docked ships. Is there another get function? When you open Universe map, there are sectors in green, when player has any property in those sectors, so i assume it is somehow possible...

Thanks for any help

jlehtone
Posts: 21809
Joined: Sat, 23. Apr 05, 21:42
x4

Post by jlehtone » Mon, 23. Jan 12, 16:57

You could get array of stations with

Code: Select all

<RetVar> = <RefObj> get station array from sector
and call

Code: Select all

<RetVar> = <RefObj> get player owned ship array from sector
for each station. I think.

tentagon
Posts: 5
Joined: Tue, 5. Jan 10, 10:42
x3tc

Thanks

Post by tentagon » Mon, 23. Jan 12, 17:50

Hi jlehtone, thanks for your advice, I am going to try it.

tentagon
Posts: 5
Joined: Tue, 5. Jan 10, 10:42
x3tc

Thx

Post by tentagon » Tue, 24. Jan 12, 23:32

Hi, so if anybody interested, the solution mentioned above is working well. Jlehtone, once more, thanks.

Post Reply

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