Blueprint Behaviour
A Blueprint behaviour module has access to some overrides for interacting with the evens of the Atoms simulation.
Init Simulation: called at the beginning of the simulation, before the first frame.
Pre Frame: called at every frame before any agent is created.
Agents Created: called when one or more agents are created.
Agents Killed: called when one or more agents are deleted.
Init Frame: called at the beginning of each frame after the agents are created.
End Frame: called at the end of each frame.
Pre Physics: called before the physics is run.
PostPhysics:Â called after the physics is run.
End Simulation: called at the end of the simulation - after the last tick.
Reset Simulation:Â when the simulation is reset.
Tutorials
Drive a module parameter
First set up your scene following one of the previous tutorials (make sure your agent group has a state machine module and the state is set to 1), then create an Atoms blueprint behaviour asset as described here.
Double click on the blueprint behaviour module asset
Create an init frame override as described here.
Search for "Get Component By Class" and create a node of that type. Set the class type to StateMachine_BehaviourComponent
Search for "Set State" and create a node of that type.
Connect the nodes as shown in the picture on the right.
In the "Set State" node, set the "state" to "0".
Save and compile the blueprint.
Close the window, then select the agent group from the world outliner.
Drag and drop the blueprint asset under the other components of the agent group.
Press play, your agents will be playing state 0.
Â
If you want to change the state on a specific agent use the SetStateOverride node instead. Set the Agent group Id of the agent that you want to set the state to.
Changing agent metadata
First set up your scene following one of the previous tutorials (make sure your agent group has a state machine module and the state is set to 1), then create an Atoms blueprint asset as described here.
Double click on the blueprint asset
Create an init frame override as described here.
Reproduce the graph that you see on the right. There are some special Atoms nodes you will need to use: "Get Vector 3Metadata" (gets a vector3 metadata from each agent) and "Set Vector 3Metadata" (sets a vector3 metadata on each agent)
Save and compile the blueprint.
Close the window, then select the agent group from the world outliner.
Drag and drop the blueprint asset under the other components of the agent group.
Press play, your agents will follow the player pawn during the simulation.
Â
Tutorial
Copyright © 2017, Toolchefs LTD.