1. #1

    Post Question : Script won't press the button it's told toPl

    Hey I'm working on a script to switch all surface noise off when it's on and on when it's off. Everything works except when it's suppose to be turned off it just won't press the noise button. It runs the note in the if statement tho. I have no idea what I'm doing wrong here.

    [ISwitch, "Noise",0, "Switches all surface noises",
    [VarSet, sBtoolsLC,[SubToolGetActiveIndex]]
    [SubToolSelect, 0] //_____saves current subtool.
    [VarSet, sBtoolsL,[SubToolGetCount]]
    [Loop, sBtoolsL,
    [If, Tool:Surface:Noise == 0,
    [IPress, Tool:Surface:Noise]
    ]
    [SubToolSelect, [SubToolGetActiveIndex] +1]
    ]
    [SubToolSelect, sBtoolsLC]
    ,
    //__________________________________________________ ___________________noise off
    [VarSet, sBtoolsLC,[SubToolGetActiveIndex]]
    [SubToolSelect, 0] //_____saves current subtool.
    [VarSet, sBtoolsL,[SubToolGetCount]]
    [Loop, sBtoolsL,
    [If, Tool:Surface:Noise == 1,
    [Note, "Loop Activated"]
    [IPress, Tool:Surface:Noise]
    ]
    [SubToolSelect, [SubToolGetActiveIndex] +1]
    ]
    [SubToolSelect, sBtoolsLC]
    ]

  2. #2
    Moderator Follow User Gallery
    Join Date
    Jun 2004
    Location
    UK
    Posts
    11,462

    Default

    You just need to use

    [IUnPress, Tool:Surface:Noise]

    when you want to turn Noise off. (It's a switch so IPress only turns it ON.)

  3. #3

    Default

    O wow sorry haha took some time off zscripting small mistake

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •