Need help with event_object_subordinate_removed

The place to discuss scripting and game modifications for X4: Foundations.

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

Post Reply
ns88ns
Posts: 90
Joined: Sun, 11. Sep 11, 22:00
x4

Need help with event_object_subordinate_removed

Post by ns88ns » Thu, 25. Nov 21, 00:19

Hi, community.

I'm working with the event event_object_subordinate_removed and I need some help with this event (X4F v4.10). There is a CUE that should be signaled by the event (when a subordinate is removed from a player-owned station), obtain the previous commander and the removed subordinate, and do some actions.

There is a group of components (stations) I need to track for removed subordinates, defined as $Stations. In CUE conditions, the event is defined as folloving:

Code: Select all

<conditions>
  <check_any>
   <event_object_subordinate_removed group="$Stations" />
  </check_any>
</conditions>
As per documentation (*.xsd), the event should return the old commander as event.object and the removed subordinate as event.object.param.

However, when signalled, this event returns valid event.object but event.object.param is always null.
I revised all default MD/AI scripts but there is only one usage of this event (order.fight.tactical.xml) and without the group attribute.

Could somebody advise what is wrong with this event and how to get it working?

Thank you in advance.

ns88ns
Posts: 90
Joined: Sun, 11. Sep 11, 22:00
x4

Re: Need help with event_object_subordinate_removed

Post by ns88ns » Thu, 25. Nov 21, 01:23

Ahhh... Caught it... Must be event.param, not event.object.param.
My fault. Works well now.

Post Reply

Return to “X4: Foundations - Scripts and Modding”