Little Script question (Syntax)


(general_daniel) #1

Hi!

I have a little question about scripting:

If I use for example “abort_if_equal”, this works like in most other program-languages like the IF

so…

accoum 1 abort_if_equal 1
blahblah…

=> if ( accum1 == 1 )
blahblah

now my questions… is there any “else”? ^^

if ( accum1 == 1 )
blahblah
else
anything other…

thx ^^

_GD


(Shaderman) #2

Unfortunately there’s no “else” :confused: You need a workaround like this:


{ // some script block
    trigger test if
    trigger test else
}

test
{
    trigger if
    {
        accum 1 abort_if_equal 1
        // do something here if accum 1 isn't 1
    }

    trigger else
    {
        accum 1 abort_if_not_equal 1
        // do something here if accum 1 is 1
    }
}