Jump to content
Sign in to follow this  
thetrooper

Trouble with syntax

Recommended Posts

I've got a trigger. and in the condition I'm trying to put;

triggerActivated walk4 && davis in thislist || tskobj_1 SetTaskState "Succeeded"; 

I'm trying to say if the trigger 'walk4' and some guy is in the radius to do something...but also do the same thing if tskobj_1 is "Succeeded"; and davis in thislist to do the same thing.

Not too sure if tskobj_1 SetTaskState "Succeeded"; is correct way to put in a condition?

Share this post


Link to post
Share on other sites

The setTaskState sets the task and does not work use as a condition. If you want it to work just use a publicVariable

Share this post


Link to post
Share on other sites

to check for task state in the condition you have to make it return as a boolean:

if ( [color="#FF0000"]([/color]triggerActivated walk4 && davis in thislist[color="#FF0000"])[/color] || taskState tskobj_1 == "Succeeded") then {
// do something
// including seting the some task state too
tskobj_2 setTaskState "Succeeded";
}

i guess you would need those (red) brackets there too.

the code you were using sets the task state does not check for it. taskState and setTaskState

Edited by gammadust

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  

×