MAXScript Language Reference > 3ds Max Objects > Animation Controllers > Controller Types > Reactor Controllers >

# Reactor controller

| Animation Controllers - Quick Navigation

The Reactor controller is a procedural controller that reacts to changes in any other controller within the software.

Reactor comes in five different forms: Position Reactor, Rotation Reactor, Point3 Reactor, Scale Reactor, and Float Reactor.

Any animatable parameter in the software can react to changes in any other animatable parameter. Reactor is not based on time, but is based on other variables in your scene.

EXAMPLE
    -- Setup a scene
    ball = sphere name:"ball"pos:[-40,0,50] radius:10
    ball.pos.controller = position_XYZ()
    -- create some keys
    key = addNewKey ball.pos.Zposition.controller 0
    key.outTangentType = #slow
    key.value = 50
    key = addNewKey ball.pos.Xposition.controller 0
    key.value = -40
    key = addNewKey ball.pos.Zposition.controller 25
    key.InTangentType = #fast
    key.outTangentType = #fast
    key.value = 4
    key = addNewKey ball.pos.Xposition.controller 25
    key.value = -10
    key = addNewKey ball.pos.Zposition.controller 50
    key.InTangentType = #slow
    key.value = 50
    key = addNewKey ball.pos.Xposition.controller 50
    key.value = 20
    ball.showtrajectory = true
    -- assign a reactor controller to the scale of the ball
    reactorCtrl= Scale_Reactor()
    ball.scale.controller = reactorCtrl
    -- Pick the react to object, and create reactions
    reactorCtrl.reactions.reactTo ball.pos.ZPosition.controller
    reactorCtrl.reactions.setName1"UnSquashed"
    reactorCtrl.reactions.setVectorState1[1,1,1]
    reactorCtrl.reactions.createname:"Squashed"
    reactorCtrl.reactions.setVectorState2[1.5,1.5,.4]
    reactorCtrl.reactions.setValueAsFloat 2 10
    reactorCtrl.reactions.setInfluence16
    reactorCtrl.reactions.setInfluence 2 5.5
    reactorCtrl.reactions.setStrength 2 1.5
    reactorCtrl.reactions.setFalloff 1 1.75
    ss = StringStream""
    reactorCtrl.reactions.getType()
    ct = reactorCtrl.reactions.getCount ()
    format "Reactor Statistics: \n------------------------------\n \n"to:ss
    format "Count : %\n"ctto:ss
    format "\n" to:ss
    for i =1 to ct do
    (
    format "Reaction #: % \n------------------------------------------------
    Name : %
    State: %
    Value: %
    Strength: %
    Influence : %
    Falloff: % \n\n"(i)\
    (reactorCtrl.reactions.getName i)\
    (getReactionState reactorCtrli)\
    (getReactionValue reactorCtrli)\
    (reactorCtrl.reactions.getStrength i)\
    (reactorCtrl.reactions.getInfluence i )\
    (reactorCtrl.reactions.getFalloff i )to:ss
    )
    print ss

#### See Also

- Reactor Controllers

- FloatReactor : FloatController

- Point3Reactor : Point3Controller

- PositionReactor : PositionController

- Rotation_Reactor : RotationController

- Scale_Reactor : ScaleController

- Interface: reactionMgr

- Controller Common Properties, Operators, and Methods

- MAXWrapper Common Properties, Operators, and Methods

- Value Common Properties, Operators, and Methods