On the last Epic presentation about StateTree
State Tree Deep Dive | Unreal Fest 2024 https://youtu.be/YEmq4kcblj4?si=FXb10pMbQzAQpwPH
It is suggested but without detailling, the Event payload are stored so we can recover the info of an Event to make processing (around 17:15)
Watching UE5.5 version, I can only spot the RequiredEventToEnter flag
but I feel it is only for conditional transition not to be processed within a task (the layer most appropriate to make processing).
Is there any pattern that enable a Task to recover the event payload on OnEnter ? I see know with a Transition argument on OnEnter but can’t find anything relative to event.
Scenario example:
Let’s figure it with a fictive scenario:
- I have an DamageEvent containing information such as DamageAmount, DamageCategory (poison, Fire, …), etc…
- In my statetree I have a Transition that is considering the DamageAmount to get the info if the Damage are Critical or Not (let’s say "If Damage > 50 => Go To CriticalDamageReaction State)
That"s fine. For this, I think I understood how to properly use statetree (at least, I hope I understood )
But, for sure on my CriticalDamageReaction State I would like a Task to process it with the event details and so do I would like to get the info from the payload (For instance, just by inflicting the exact amount of damages to a health component). I figure there is a way for the Task to get the Event but I don’t find it. I probably miss something.
I would appreciate if anybody have clues on the subject how an active Task can recover Event Payload informations?
Cheers