Jump to content
Sign in to follow this  
Rexxenexx

How can i tell if team is dead?

Recommended Posts

Their are too many AI roaming around to have the usual West Not Present trig. Here's what I got. First off its multiplayer,

the Leader is AI and their are eight other solders (Playable).

I tried naming all the units then I tried "mygrp = group this" in the Init of the leader 'cause he's AI and is always there. But I had a brain fart on how the hell I could use this to end it? I tried to make a trig w/ count(units mygroup)==0 as a condition, then I realized it will only call it once unless I script it and loop it which would hog resources. So how do you guys determine if a team is dead?

Share this post


Link to post
Share on other sites

Make a trigger

Make it "not present" then group it to your officer and in the field where there s west, east, etc etc will now be vehicle, group, etc. I usualy select "any unit of group" ( last selection, sry not at home so dont know 100% sure for the selection ) Then that trigger will only activate when group is whiped out.

Cheers.

Share this post


Link to post
Share on other sites

For mp you can put the "playergrp = group this" stuff in the init of all player units in the group (so if any, including leader, are disabled, it will still work).

Then

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

("not alive _x" count units playergrp) == count units playergrp

<span id='postcolor'>

will activate the player death trigger.

Share this post


Link to post
Share on other sites

</span><table border="0" align="center" width="95%" cellpadding="3" cellspacing="1"><tr><td>Quote (Nagual @ Sep. 25 2002,20:27)</td></tr><tr><td id="QUOTE"></span><table border="0" align="center" width="95%" cellpadding="3" cellspacing="1"><tr><td>Code Sample </td></tr><tr><td id="CODE">

("not alive _x" count units playergrp) == count units playergrp

<span id='postcolor'><span id='postcolor'>

Sweet this works perfectly!! THX man! biggrin.gif

can someone explain the first part of the script so I don't just use it without REALLY knowing what its doing. I understand the count of the units in the group, but the string in front of it...??? I understand that its determining that _x is not alive but the format of "[]"[]==[]. How does this work, I actually used it in another way by experimenting and it worked VERY COOL for not allowing a retarded heli to leave troops behind:

"_x in heli1" count units mygrp==count units mygrp

So I kinda know, but I don't hehe... wink.gif

Someone straiten it out for me plz!!

Share this post


Link to post
Share on other sites

crapola! the </span><table border="0" align="center" width="95%" cellpadding="3" cellspacing="1"><tr><td>Code Sample </td></tr><tr><td id="CODE">"_x in heli1" count units mygrp==count units mygrp <span id='postcolor'> condition on the load waypoint of the heli doesn't work if only one player is on the server. the next waypoint is activated and the chopper just sits there.

mad.gif

I guess I REALLY dont know what it all means wink.gif

Share this post


Link to post
Share on other sites

Dont get discouraged by choppers not doing what you want, they have caused all mission makers grief at one point or another.

Ive used that method for helo pickup before, and usually works well, but can be broken somehow when human leader dies but leadership is not transferred to next player.

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

"_x assignascargo helo1" foreach units playergrp

"[_x] ordergetin true" foreach units playergrp

"unassignvehicle _x" foreach units playergrp

<span id='postcolor'>

works well for getting ai to board / disembark helo. But im not sure if i can explain how it works wink.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  

×