ScriptBind_Boids

CreateFlock

Boids.CreateFlock( entity,paramsTable ) Creates a flock of boids and binds it to the given entity. 
ParameterDescription
entityValid entity table.
nTypeType of the flock, can be Boids.FLOCK_BIRDS,Boids.FLOCK_FISH,Boids.FLOCK_BUGS.
paramTableTable with parameters for flock (Look at sample scripts).

CreateFishFlock

Boids.CreateFishFlock( entity,paramsTable ) Creates a fishes flock and binds it to the given entity. 
ParameterDescription
entityValid entity table.
paramTableTable with parameters for flock (Look at sample scripts).

CreateBugsFlock

Boids.CreateBugsFlock( entity,paramsTable ) Creates a bugs flock and binds it to the given entity. 
ParameterDescription
entityValid entity table.
paramTableTable with parameters for flock (Look at sample scripts).

SetFlockParams

Boids.SetFlockParams( entity,paramsTable ) Modifies parameters of the existing flock in the specified entity. 
ParameterDescription
entityValid entity table containing flock.
paramTableTable with parameters for flock (Look at sample scripts).

EnableFlock

Boids.EnableFlock( entity,paramsTable ) Enables/Disables flock in the entity. 
ParameterDescription
entityValid entity table containing flock.
bEnabletrue to enable or false to disable flock.

SetFlockPercentEnabled

Boids.SetFlockPercentEnabled( entity,paramsTable )  Used to gradually enable flock. Depending on the percentage more or less boid objects will be rendered in flock.  
ParameterDescription
entityValid entity table containing flock.
nPercentIn range 0 to 100, 0 mean no boids will be rendered,if 100 then all boids will be rendered.

SetAttractionPoint

Boids.SetAttractionPoint( entity,paramsTable ) Sets the one time attraction point for the boids 
ParameterDescription
entityValid entity table containing flock.
pointThe one time attraction point

OnBoidHit

Boids.OnBoidHit( flockEntity,boidEntity,hit ) Events that occurs on boid hit. 
ParameterDescription
flockEntityValid entity table containing flock.
boidEntityValid entity table containing boid.
hitValid entity table containing hit information.

CanPickup

Boids.CanPickup( flockEntity, boidEntity ) Checks if the boid is pickable 
ParameterDescription
flockEntityValid entity table containing flock.
boidEntityValid entity table containing boid.

GetUsableMessage

Boids.GetUsableMessage( flockEntity ) Gets the appropriate localized UI message for this flock 
ParameterDescription
flockEntityValid entity table containing flock.

OnPickup

Boids.OnPickup( flockEntity, boidEntity, bPickup, fThrowSpeed ) Forwards the appropriate pickup action to the boid object 
ParameterDescription
flockEntityValid entity table containing flock.
boidEntityValid entity table containing boid.
bPickupPickup or drop/throw?
fThrowSpeedvalue > 5.f will kill the boid by default (no effect on pickup action)