The above is completely fine until someone has 20 mods in their game that all wanted to reinvent the wheel.<event_object_destroyed group="global.$Ships_all" />
We are making a library to solve this problem. What groups/events do you want to use?
Here is the Current list.
Here is a use case:global.$X4_SectorAdjacencyTable
global.$X4_All_Clusters
global.$X4_All_Sectors
global.$X4_All_Zones
global.$X4_All_Gates
global.$X4_Player_Ships
global.$X4_Player_Stations
global.$X4_All_Ships
global.$X4_All_Constructors
global.$X4_All_Resupply
global.$X4_All_Stations
global.$X4_Stations_shipyards
global.$X4_Stations_wharfs
global.$X4_Stations_equipmentdocks
global.$X4_Stations_headquarters
global.$X4_Stations_trading
global.$X4_Stations_pirate
global.$X4_Stations_defence
Code: Select all
<cue name="Init" instantiate="true">
<conditions>
<event_cue_signalled cue="md.Setup.GameStart" />
</conditions>
<actions>
<create_group groupname="$DockedPlayerShips" />
</actions>
<cues>
<cue name="ExampleSliceDock" instantiate="true">
<conditions>
<event_object_docked group="global.$X4_Player_Ships" />
</conditions>
<actions>
<do_if value="event.object.owner == faction.player">
<add_to_group groupname="$DockedPlayerShips" />
</do_if>
</actions>
</cue>
<cue name="ExampleSliceUndock" instantiate="true">
<conditions>
<event_object_undocked group="$DockedPlayerShips" />
</conditions>
<actions>
<do_if value="event.object.owner == faction.player">
<remove_from_group group="$DockedPlayerShips" object="event.object" />
</do_if>
</actions>
</cue>
</cues>
</cue>