Jump to content
Sign in to follow this  
Desrat

Checking ObjStatus from SQS

Recommended Posts

Hey all, quick & hopefully simple question..

How do you check if an objective is completed from within an sqs script?  I've tried the following

<table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">?(Target1 == true) : goto "Code1"

obviously I have a trigger set on the map with

<table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">"1" ObjStatus "DONE";Target1=true;

in the act field when the objective is done.

So any insight??? Thx in advance

Des

EDIT : nvm, figured it out

<table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">?(Target1) : goto "Code1"

Share this post


Link to post
Share on other sites

To check boolean values you don't need == true. Just write it like this:

<table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">

?(Target1) : goto "Code1"

As boolean values only have 2 possible states, unlike other variable types, it doesn't need that sort of countercheck.

In return, if you want to check if a variable is false, the code would be:

<table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">

?!(Target1) : goto "Code1"

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  

×