SetBehaviorVariable
From MaratisWiki
setBehaviorVariable(object, behaviorId, « variableName », value)
Is used to tweak your object behavior.
- Short description
- object : The object with the active behavior
- behaviorId : If your behavior is the first on the list, behaviorId will be 0, the second will be 1, etc.
- variableName : Behavior parameter name
- value : Behavior parameter value
- object : The object with the active behavior
Small example, let's say you have a scene with two boxes (Box1, Box2), and a camera (Camera).
The camera have "LookAt" behavior active and is set to look at Box1, so your behavior is currently :
setBehaviorVariable(Camera, 0, "target", "Box1")
You want to tweak the behavior to make it look at Box2 :
setBehaviorVariable(Camera, 0, "target", "Box2")