Hi,
We are currently facing an issue when trying to play component entity sequence from Lua code.
Maybe we miss something. Below the steps to reproduce :
-
Create a component entity sequence : This automatically creates a new entity with a component “Sequence”. The entity animated by the sequence got a component “SequenceAgent” automatically added to it. Note that it’s not possible to add manually either “Sequence” or “SequenceAgent” component.
-
Add a LUA script to the animated entity by sending an event to the sequence entity :
GameplayNotificationBus.Event.OnEventBegin(notificationIdToSend, self.entityId);
- Add a LUA script component to the sequence entity and receive the event sent above and call “Play”
SequenceComponentRequestBus.Event.play(self.Properties.Recipients.DoorEntity);<br>
But it doesn’t work. I got following error :
[Error] (Script) - content/scripts/triggereventreceiversequence.lua:39: attempt to call field ‘play’ (a nil value)
Is this the correct way to play a sequence via Lua ?
Do we miss something ?
Can you please help on this?
Thanks in advance