For one of these I wanted to run some actions whenever one of my ships is assigned to one of my stations.
The MD I initially came up with looks like this (though it doesn't check for owner yet):
Code: Select all
<cue name="CommanderAssignedHandler" instantiate="true" namespace="this">
<conditions>
<event_object_commander_set />
<check_value value="event.param.type" exact="entitytype.manager" />
<check_value value="event.param.controlled.isclass.[class.ship_xl, class.ship_l, class.ship_m]" />
</conditions>
<actions>
<set_value name="$commander" exact="event.param" />
<set_value name="$ship" exact="$commander.controlled" />
<debug_text text="'Ship reassigned: %s Macroname: %s Commander: %s'.[$ship.name, $ship.macro.name, $commander.name]" />
</actions>
</cue>
Code: Select all
[=ERROR=] 457942.89 Error in MD cue md.BV_CustomStuff.CommanderAssignedHandler: Error evaluating <event_object_commander_set> event object: Value 'null' is not of type component
Does anyone know of a good approach for just running some actions whenever a player-owned ship is assigned to a station?
Thank you