Jump to content
Sign in to follow this  
InqWiper

Very simple scripting question

Recommended Posts

Ok I need a script to do something when a variable like a1 is set to true.

I tried this:

?(a1==true):goto "here"

?(a1):goto "Here"

Can someone plz tell me the right way to do it.

Share this post


Link to post
Share on other sites

you will need to set the variable first (posibly by a trigger using something like a1=true

the 'false' part of your script could read something like this:

?(a1 != true):goto "Here"

the != means 'not equal' so if a1 was equal to anything other than true

Share this post


Link to post
Share on other sites

Ok I tried this.

#Start

Test=true

#Loop

?!(Test=true):Titletext ["Its working!","PLAIN"],goto "Start"

goto "Loop"

test is set to false by radio alpha, so every time I use radio alpha the text "Its working!" should show up right ?

When I tried this I got this error message:

'!(Test|#|=true)':Error Unknown operator

I also tried this:

#Start

Test=true

#Loop

?(Test!=true):Titletext ["Its working!","PLAIN"],goto "Start"

goto "Loop"

then I got this error message:

'(Test=true)|#|': Error type Bool, expected Number,String,Object,Side,Group

Share this post


Link to post
Share on other sites

go like this:

test = true

#loop

? !test: Titletext ["Its working!","PLAIN"], ...

goto "loop"

if you do test=true, you are redeclaring the variable, not comparing it (compare with ==). in case of a bool you don't have to manually compare though.

Share this post


Link to post
Share on other sites

Guess what...

"Its working!"

Thanks man smile.gif

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
Sign in to follow this  

×