thetrooper 10 Posted May 8, 2014 Hey. I got a condition in a trigger that doesn't seem to work: !(isEngineOn jet) && jet in thislist && taskState task8 == "SUCCEEDED"; It runs fine without the taskState task8 == "SUCCEEDED"; It was something using from Arma2, but not sure it needs to be something else, or is there a conflict? Share this post Link to post Share on other sites
thetrooper 10 Posted May 8, 2014 Is task8 defined? Hi, yeah its defined. It's the code is fine then there's definately something else. Not at my compfor acouple of days, it must besomething to do with the objective not completing properly. Share this post Link to post Share on other sites
Tajin 349 Posted May 8, 2014 try this, to see what output taskState actually generates: hint taskState task8; Maybe your comparison doesn't work because it's case sensitive. Share this post Link to post Share on other sites
thetrooper 10 Posted May 8, 2014 try this, to see what output taskState actually generates:hint taskState task8; Maybe your comparison doesn't work because it's case sensitive. Cheers, I'll give it a go when I get home tomorrow. Share this post Link to post Share on other sites
[evo] dan 79 Posted May 8, 2014 Try this: (!isEngineOn jet) && (jet in thislist) && (taskState task8 == "SUCCEEDED"); It might be having trouble with the == being in it. Share this post Link to post Share on other sites
thetrooper 10 Posted May 10, 2014 ok, this isn't working. Task 8 is completed. There's another option, though don't know the syntax. There are two possible triggers that can complete task8. So this is what I'm thinking. Either two triggers need to be activated: triggerActivated endead || triggerActivated enrun These have to be present or true though. !isEngineOn jet && jet in thislist; How do I put that together? Share this post Link to post Share on other sites
f2k sel 164 Posted May 11, 2014 !isEngineOn jet && jet in thislist && (triggerActivated endead || triggerActivated enrun) Share this post Link to post Share on other sites
Polymath820 11 Posted May 12, 2014 https://community.bistudio.com/wiki/Task TaskState is not expressed as what you may think, it is "TaskDone" so you are using the == comparison operator on a boolean expression that will never fall true. Because you are doing TaskState task8 == "SUCCEEDED" when it should be comparing TaskState task8 == "TaskDone" Because your condition never falls true it never executes because you have 2 true conditions which accounts for a "half truth && is based on boolean algerbra Namely it's similar to multiplication what is 1 * 0 = 0? what is 0 * 1 = 0? 1 * 1 = 1 and 0 * 0 = 0? so in your expression the Boolean break down is All of the AND conditions must be met. The JetEngine is OFF(TRUE) JET IS IN LIST(TRUE) TaskState IS SUCCEEDED(FALSE) 1 * 1 * 0 = 0 therefore no true condition occurs at all. Therefore your code is not executed. Share this post Link to post Share on other sites
thetrooper 10 Posted May 12, 2014 https://community.bistudio.com/wiki/TaskTaskState is not expressed as what you may think, it is "TaskDone" so you are using the == comparison operator on a boolean expression that will never fall true. Because you are doing TaskState task8 == "SUCCEEDED" when it should be comparing TaskState task8 == "TaskDone" Because your condition never falls true it never executes because you have 2 true conditions which accounts for a "half truth && is based on boolean algerbra Namely it's similar to multiplication what is 1 * 0 = 0? what is 0 * 1 = 0? 1 * 1 = 1 and 0 * 0 = 0? so in your expression the Boolean break down is All of the AND conditions must be met. The JetEngine is OFF(TRUE) JET IS IN LIST(TRUE) TaskState IS SUCCEEDED(FALSE) 1 * 1 * 0 = 0 therefore no true condition occurs at all. Therefore your code is not executed. Ah, tht could explain it. I'll have a go at this first later on tonight. Thanks for the input. Share this post Link to post Share on other sites