Jump to content
Sign in to follow this  
Kommiekat

{alive _x} count thislist<3

Recommended Posts

Hello everyone,

I just want to clarify this code I'm going to use in 3 triggers.

I want Opfor to clear three areas of the battle field of Independents for a TASK SUCCESS.

My confusion is this:

{alive _x} count thislist<3

Independent

Present

or

{alive _x} count thislist<3

Independent

Not Present

In other words, should be present or not present?

Lastly, same question for this code:

{alive _X && !isFleeing _X} count thislist <= 5

.........which pretty much does the same thing, yes?

Thank you for your help,

KK

Share this post


Link to post
Share on other sites

Present. It's sure.

But I'm not sure thislist is change in runtime or not. For 100% sure, I should do this: create two trigger. One is triggered in the begining of the mission by "present independent" and codeline: aafdefenders=thislist; And the other trigger is triggered by your code: {alive _x} count aafdefenders<3

Share this post


Link to post
Share on other sites
{alive _X && !isFleeing _X} count thislist <= 5

If you want to check the number of independents in the area you are going to have to check the side count inside the trigger. Your condition code as it is checks for all sides. When the condition box of the trigger doesn't have a "this" statement in it, the parameters you setup for the trigger aren't considered except maybe the size of the trigger area depending on your condition code. If you want to check to see the count of alive independent forces use this.

{side _x == independent}count thisList <= 5 && this

Edited by Johnson11B2P

Share this post


Link to post
Share on other sites
Present. It's sure.

But I'm not sure thislist is change in runtime or not. For 100% sure, I should do this: create two trigger. One is triggered in the begining of the mission by "present independent" and codeline: aafdefenders=thislist; And the other trigger is triggered by your code: {alive _x} count aafdefenders<3

Thanks Mr. Bardosy!

---------- Post added at 10:42 PM ---------- Previous post was at 10:41 PM ----------

{alive _X && !isFleeing _X} count thislist <= 5

If you want to check the number of independents in the area you are going to have to check the side count inside the trigger. Your condition code as it is checks for all sides. When the condition box of the trigger doesn't have a "this" statement in it, the parameters you setup for the trigger aren't considered except maybe the size of the trigger area depending on your condition code. If you want to check to see the count of alive independent forces use this.

{side _x == independent}count thisList <= 5 && this

Hi, so to be sure, that's Independent PRESENT in the trigger, correct?

Share this post


Link to post
Share on other sites

if the trigger is already INDEPENDENT PRESENT then thislist won't contain EAST or WEST units anyway.

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  

×