Jump to content
Sign in to follow this  
theavonlady

When does trigger DeActivation go into effect?

Recommended Posts

Let's say you have a trigger based upon a unit entering within the trigger area.

Let's say that the trigger definition states that on activation:

INTRIGGERAREA = TRUE

and on deactivation:

INTRIGGERAREA = FALSE

If the mission starts with the unit not in the trigger area, is:

INTRIGGERAREA = FALSE

or is:

INTRIGGERAREA = null value

rock.gif

TIA (Raedor)! smile_o.gif

Share this post


Link to post
Share on other sites

<table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">? format ["%1", RHS_T55_NoScripts] == "scalar bool array string 0xfcffffef": RHS_T55_NoScripts = false biggrin_o.gif

Share this post


Link to post
Share on other sites
<table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">? format ["%1", RHS_T55_NoScripts] == "scalar bool array string 0xfcffffef": RHS_T55_NoScripts = false
biggrin_o.gif

You lost me. sad_o.gif

Share this post


Link to post
Share on other sites

if you want to check it in a trigger, write<table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">format ["%1", InTriggerArea] == "scalar bool array string 0xfcffffef"in the condition line... that's it.

Share this post


Link to post
Share on other sites
if you want to check it in a trigger, write<table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">format ["%1", InTriggerArea] == "scalar bool array string 0xfcffffef"
in the condition line... that's it.

Really? That's pathetic! wow_o.gif

Share this post


Link to post
Share on other sites
erm... yes... maybe... but... is it working?  rock.gif  ghostface.gif

Yes, it is.

Or you can try to make variable to be objNull in init.sqs<table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">variable=objNulland then check condition<table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">isNull variable

So you can have boolean with 3 values:

1)true, 2)false, 3)objNull or "scalar bool array string 0xfcffffef"

Share this post


Link to post
Share on other sites

Best to declare it false in INIT.SQS and update as required.

Not forgetting of course that trigger areas are local in effect and detection, so that such a variable would have to be globally false or true in MP games..........

TJ

Share this post


Link to post
Share on other sites
Best to declare it false in INIT.SQS and update as required.

Not always, as there are cases where TRUE, FALSE and UNKNOWN are needed for logic testing.

If you are only checking for TRUE versus FALSE, skip initializing in init.sqs and always test if something is either TRUE or NOT TRUE.

Share this post


Link to post
Share on other sites

But here you get the problem in MP games.

It is possible to get TRUE on one client and NULL on another, despite a trigger having been activated.

My method is always, check for existing variable......if it doesnt exist, define it, and where appropriate, globalize it.

Besides, why are you up this late? rock.gif

TJ

Share this post


Link to post
Share on other sites
Besides, why are you up this late?  rock.gif

LOL! I was on a cooking spree last night. An 8 day holiday coming up. smile_o.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  

×