Jump to content
Sign in to follow this  
majinbot

Trigger condition

Recommended Posts

I'm trying to make a trigger where the civilian detect the player..

On condition:

{(side _x == CIV) && (_x knowsAbout player >= 1)} && (alive e1)

...but there is an error, HELP PLEASE!!

---------- Post added at 07:38 PM ---------- Previous post was at 07:31 PM ----------

Maybe:

(alive e1) && {(side _x == CIV) && (_x knowsAbout player >= 1)} count thislist > 0

Right?

Share this post


Link to post
Share on other sites
Why not just use the "Detected by Civilians" built in option?

Because i have to get very close to the civilian for the trigger to work, i shoot many times 300m away and the trigger doesn't works. I need a faster reaction!! And I don't know why even this doesn't work:

{(side _x == CIV) && (_x knowsAbout player >= 0.1)} count thislist > 0  

Share this post


Link to post
Share on other sites

Thanks to all, found solution:

(civilian knowsAbout player) > 0

Share this post


Link to post
Share on other sites

Figured I'd ask in this thread since the title works.

What about a trigger condition that whats to know whether a crew from a bradley is alive? What would that look like?

I've tried stuff like:

!(alive crew brad1) && !(alive crew brad2)

or

not alive crew brad1 && not alive crew brad2

These don't work, any ideas?

EDIT:

Even better than the crews alive would be a trigger condition that actives when both crews' damage gets to a certain level.

Edited by Manzilla

Share this post


Link to post
Share on other sites

crew returns an array, so you'd need to forEach loop through it to check if they are all alive (or count).

Share this post


Link to post
Share on other sites
crew returns an array, so you'd need to forEach loop through it to check if they are all alive (or count).

Now how exactly would that be done in the trigger? Never used the forEach loop before. Sounds interesting, thanks for the info!

Share this post


Link to post
Share on other sites

For that example you'd probably want to use count:

{alive _x} count crew brad1 <= 0 && {alive _x} count crew brad2 <= 0

So it checks each member of crew of brad to see if they are alive and if the count of that, for both brad1 and brad2 is 0, then the trigger is set off.

But in this demo you'll see forEach being used to kill each member of the crew in order:

{_x setDamage 1} foreach crew brad1;

It takes the crew of brad1, and for each of them set's damage 1 to kill them.

Share this post


Link to post
Share on other sites

Saw it somewhere the other day I think, or I'm just imagining things, but yeah probably could just leave it as == 0 :)

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  

×