Jump to content
Sign in to follow this  
kocrachon

Mistyped string?

Recommended Posts

So I am trying to use this string right here for trigger condition that makes a vehicle know if all of the living group members are in the vehicle (even if I haven't reported them as down)

<table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">({ (not (_x in Stryker1)) and (alive _x) } count (units (group Team1))) == 0;

However I get an error are the part (group Team1) saying this

<table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE"> (#group Team1) type group, expected object

the group that I am having do this has this in the init field on the squad leader

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

So at this point I am slightly confused

Share this post


Link to post
Share on other sites

Try:

({ (not (_x in Stryker1)) and (alive _x) } count (units Team1)) == 0;

Team1 is already a group (data type), so you don't need to use the group command in this case.

Share this post


Link to post
Share on other sites

({ (not (_x in Stryker1)) and (alive _x) } count (units Team1)) == 0;

Ah the makes sense.

Now if I were to do this

<table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">({ (not (_x in Stryker1)) and (alive _x) } count (Group Soldier1)) == 0;

Would it still work even if Soldier1 who is the group leader died? Or would the new group be named Soldier2 if the next in command was named Soldier2?

Share this post


Link to post
Share on other sites
Would it still work even if Soldier1 who is the group leader died?

No.

But if you define the group when he is still alive,

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

you can use its variable instead of leader:

<table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">({ (not (_x in Stryker1)) and (alive _x) } count units _mygrp) == 0;

EDIT: Repeating what was said before. I should read whole discussion next time smile_o.gif

However, answer is still same.

Share this post


Link to post
Share on other sites

Ah, thats what I was afraid of. Was just hoping that worked so I didn't have to define about 20 different groups, oh well =P

Thanks

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  

×