Problem with UserDefinedAction in Init Section
Describe the feature
Currently it is not possible to use UserDefinedAction
in the Init
section and have the action assigned to a specific actor.
The reason is that for PrivateAction
the actor is specified in the parental Private
element, where Private
can only be used in the Init
section. There is no equivalent for UserDefinedAction
.
Describe the solution you would like
A possible solution might be to add a new element similar to Private
for UserDefinedAction
that is only usable in Init
. Additionally we should disallow old usage of UserDefinedAction
in init section. This breaks backward compatibility.
Describe alternatives you have considered
Could not think of anything else. Adding the entityRef
to UserDefinedAction
does not seem a good solution, as actors are specified in the Actors
element of ManeuverGroup
.
Describe the backwards compatibility
Might break backward compatibility, depending on the implementation.
Additional context
The example shows the difference between UserDefinedAction
and PrivateAction
.
<Actions>
<UserDefinedAction>
<CustomCommandAction type='{"Custom_Parameter" : true}'/>
</UserDefinedAction>
<Private entityRef="F0: F0">
<PrivateAction>
<TeleportAction>
<Position>
<WorldPosition x="501" y="4.5" z="0" h="4.71" p="0" r="0"/>
</Position>
</TeleportAction>
</PrivateAction>
</Private>
</Actions>