SetBehaviorVariable

From MaratisWiki
Revision as of 07:57, 4 November 2012 by Vegas (Talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

setBehaviorVariable(object, behaviorId, « variableName », value)

Is used to tweak your object behavior.

  1. 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

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")
Personal tools
Namespaces
Variants
Actions
Navigation
Toolbox