Menu
Lumberyard
Legacy Reference

Boid Entity

Boid entities simulate animals exhibiting group behavior, obstacle avoidance, animations, and sound. Their complex behavior arises from the interaction of an individual agent boid with other boids and the environment in which they move.

Not all parameters are available for all boid classes. For example, Behavior classes are needed only for the Bugs boid class and do not appear in other Boid properties.

Boid Properties

Properties Description
Model1-5 Additional geometry for the boid; this can be a character (.CHR) or static geometry (.CGF). If you specify more than one option, the geometry is selected at random.
Model Geometry for the boid; this can be a character (.CHR) or static geometry (.CGF).
Mass Mass of each individual boid.
Invulnerable Specifies whether the boid can be killed or not.
gravity_at_death Gravity acceleration that affects the body of the killed boid.
Count Specifies how many individual objects are spawned.
Behavior Movement behavior for the boid entity:
  • 0 = Generic ground bugs, such as beetles

  • 1 = Flying insects, such as dragonflies

  • 2 = Leaping insects, such as grasshoppers

Flocking Properties

Properties Description
AttractDistMax Maximum distance at which one boid can see another boid. Boids that are too far away are not interacted with.
AttractDistMin Minimum distance that boids are comfortable with to stay close to each other before the separation force starts to affect them.
EnableFlocking When enabled, the rules of the emergent flocking behavior is calculated on the whole flock of boids.
FactorAlign Steer towards the average heading of local flock-mates.
FactorCohesion Steer to move toward the average position of local flock-mates.
FactorSeparation Steer to avoid crowding local flock-mates, only when closer then AttractDistMin.
FieldOfViewAngle Field of vision of the boid to consider other boids as flock-mates.

Note

The following Ground properties apply only when boids are walking on the ground. Boids are able to land only in game mode and not while editing.

Ground Properties

Properties Description
WalkToIdleDuration Time it takes for boids to transition from walking to idle state.
WalkSpeed Walk speed when boids land.
OnGroundWalkDurationMin Minimum time that boids can spend in walk state.
OnGroundWalkDurationMax Maximum time that boids can spend in walk state.
OnGroundIdleDurationMin Minimum time that boids can spend in idle state.
OnGroundIdleDurationMax Maximum time that boids can spend in idle state.
HeightOffset Vertical offset of boids from the ground.
FactorSeparation Tries to ensure that boids avoid one another.
FactorOrigin Controls how much boids are attracted to their point of origin.
FactorCohesion Tries to ensure that boids group together.
FactorAlign Tries to ensure that all boids move in roughly the same direction.

Movement Properties

Properties Description
FactorAvoidLand Force coefficient to divert boid from the land or water.
FactorHeight Controls the force that is applied to keep boids at the original height for the flock.
FactorOrigin Controls the force that attract boids to the origin point of the flock.
FactorTakeOff Vertical movement speed scale during take-off.
FlightTime Approximate flight time before attempting to land.
HeightMax Maximal height boids can fly to (height above land).
HeightMin Minimal height boid can fly at (height above land).
LandDecelerationHeight Height at which boids start to decelerate when landing.
MaxAnimSpeed If the boid had animations, then use this variable to control the speed of the animation.
SpeedMax Maximum speed for boid movement.
SpeedMin Minimum speed for boid movement.

Options Properties

Properties Description
Activate When checked, active boids are visible and move from the start of the level; alternatively, boids can be activated at a later stage with the activate event.
AnimationDist Maximum distance from camera at which animations update.
FollowPlayer When checked, boids wrap around only current player position, and the flock origin point becomes the player position. If the boid flies too far away from the player, it reappears on the opposite side.
NoLanding Turns landing for birds flocks on and off.
ObstacleAvoidance Boids sense the physical environment and can be diverted from the physical obstacles. This option adds heavier physical checks on the boids and should be used carefully (only when really needed).
Radius Maximum radius that the boid can move from the flock origin point.
SpawnFromPoint If true, all the boids spawn at the boid entity position.
StartOnGround If true, boids spawn on the ground; otherwise, they spawn in the air.
VisibilityDist Maximum distance from which the whole flock can be visible. If player camera is further away from the flock origin point than VisibilityDist, boids are not simulated and rendered.

ParticleEffect Properties

Properties Description
EffectScale Scale of the particle effect to be played.
waterJumpSplash Particle effect to be played when the boid splashes into the water.