Found planets in system |

Hi, Is there a easy way to write a script that creates a list of planets that a player OWNS in a system. Thanks for any help.
He ponders the dangers inherent in the advantages, and advantages inherent in the dangers. - Ts'ao Ts'ao
highlighter/User define lang for NOTEPAD++ for SEV
Crimson Concept Mod for SEV
Crimson

Re: Found planets in system
Are you doing this as part of the main empire scripts or as part of the event/intel scripts?
If you're doing this as part of a function for an AI, then the longlist variable lst_AI_Our_Colonies already contains the planet IDs of an empire's colonies. The values are added in the Examine_System function in Script_AI_Lists. You can then use Sys_Get_Space_Object_System_Location(planet_id) to return planet's system location, which can be compared to the system in question. Any matches you can throw into a new longlist variable.
If you're doing this as an event or intel operation, then you have to return all the objects in the system in question. Then check if they are planets and if they are owned.

Re: Found planets in system
The Sys_Empire_Politics_Get_Political_Status_Between_Players(plrA, plrB) returns the status between two empires. It will return one of the 4 constants:
POLITICAL_STATUS_TYPE_UNKNOWN = 1
POLITICAL_STATUS_TYPE_KNOWN = 2
POLITICAL_STATUS_TYPE_WAR = 3
POLITICAL_STATUS_TYPE_TREATY = 4




But I'm hoping for a function that GETs
Re: Found planets in system
Cross reference the player's list of colonies by returning their system location versus the system in question. For any matches, add them to a new list.
Space Empires Depot | SE:V Balance Mod