Sequencer
You can use Unreal Engine sequencer to drive your crowds. Please watch the video below to know how.
Per agent properties
Since AtomsUnreal 2.4.0, it is possible to control agent override properties from a sequence. For example, if you want to set the override for the state property of the state machine component follow these steps:
Add the state machine component to the agent group actor track.
Use the agents layout tool to select some agents.
Add the state property override track from the “Per agent properties” submenu. This creates a new track for the state property and controls only the agents that you selected when you created the track.
Add now a keyframe to the state track and press play. You’ll see only the selected agents using the new state value.
You can remove or add agents to a per agent property track. Select from the viewport, using the agent layout tool, the agents you want to add to/remove from a track. Then press the right mouse button on the track and choose from the menu Remove/Add selected agents.
Due to a bug with the current version of unreal. If you are going to delete a per agent property track or removing all the agents from a track, remember to clear the override map from the agent group actor, using the “bin“ button.
Frame controller Behaviour
In case you have some agent groups that must be computed in a specific order, you can’t control their static frame inside the sequencer. The sequencer executes multiple tracks at the same time, so it is not possible to define a specific order. This is a problem when you have an agent group with a Sync behaviour component. This group must be computed after its parent, so if you can’t animate its static frame and its parent’s static frame property inside the sequence.
A solution to this problem is the “Frame controller behaviour” component. This component contains a list of agent groups and it computes these agent groups in order using the static frame property of the owner actor.
From our demo project, open the level /Content/Demo_Maps/13_Sync_agentGroups/01_Sync_ParentChild. This map contains an AtomsAgentGroup1 actor with a simple gridLayout and state machine component. Then there is an AtomsAgentGroup3 with a sync behaviour component.
Now create a new AgentGroup actor and add a FrameControllerBehaviour component. Then add to the AgentGroups property the AtomsAgentGroup1 and AtomsAgentGroup3. In this way, the frame controller computes the agentgroup1 and then the agentGroup3.
Now you can setup the sequencer. Add only the agent group with the frame controller component to the sequencer. Activate the useStaticFrame and then animate the Static Frame property.
Copyright © 2017, Toolchefs LTD.