Set the behaviors variable.
- 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
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")