/
Creating agent types
Creating agent types
import Atoms import AtomsCore from Atoms import GLOBAL_NAMES AGENT_TYPE = GLOBAL_NAMES.AGENT_TYPE skeletonPath = "/path/to/skelfile.atomsskel" geoPath = "/path/to/geofile.geos" skinPath = "/path/to/skinfile.geos" skel = AtomsCore.Skeleton(1) skeletonArchive = AtomsCore.Archive() if skeletonArchive.readFromFile(skeletonPath): skel.deserialise(skeletonArchive) aType = Atoms.AgentType() aType.setSkeleton(skel) meshMap = AtomsCore.MapMetadata() typeArchive = AtomsCore.Archive() if typeArchive.readFromFile(geoPath): meshMap.deserialise(typeArchive) aType.metadata()[AGENT_TYPE.LOW_GEO] = meshMap skinMap = AtomsCore.MapMetadata() skinArchive = AtomsCore.Archive() if skinArchive.readFromFile(skinPath): skinMap.deserialise(skinArchive) aType.metadata()[AGENT_TYPE.SKIN_GEO] = skinMap aType.metadata()[AGENT_TYPE.STATE_MACHINE] = AtomsCore.StringMetadata("StateMachine") # StateMachine should be a valid state machine name aType.metadata()[AGENT_TYPE.SCALE_MULTIPLIER] = AtomsCore.DoubleMetadata(1.0) Atoms.AgentTypes.instance().addAgentType("testAgentType", aType)
, multiple selections available,
Related content
Agent type
Agent type
More like this
Creating agent groups
Creating agent groups
More like this
Layouting agents (AtomsUnreal)
Layouting agents (AtomsUnreal)
More like this
Agent Aim
Agent Aim
More like this
Access agent data (AtomsUnreal)
Access agent data (AtomsUnreal)
More like this
Writing a Metadata Replicator module
Writing a Metadata Replicator module
More like this
Copyright © 2017, Toolchefs LTD.