Jump to content
Sign in to follow this  
acidcrash

Checking unit status

Recommended Posts

alright, heres the situation:

i have 4 squads paradropping in...no i dont want a paradrop script... and every now and then 1 or more dies during the jump, be it from collision or too low to the ground. What i want is for a radio call that checks how many is left from each group.

so far i have it that they all check in if they are ALL alive

</span><table border="0" align="center" width="95%" cellpadding="3" cellspacing="1"><tr><td>Code Sample </td></tr><tr><td id="CODE">A1 sidechat "All stations, status check"

~2

(count units grpb) >= 9; B1 sidechat "Bravo 1 all here"

~1

(count units grpc) >= 9; B1 sidechat "Charlie 1 all here"

~1

(count units grpd) >= 12; B1 sidechat "Delta 1 all here"<span id='postcolor'>

thats all well and good, but what i want is that, if someone dies then instead of saying "all here", i want it to say how many dead. i thought maybe

</span><table border="0" align="center" width="95%" cellpadding="3" cellspacing="1"><tr><td>Code Sample </td></tr><tr><td id="CODE">if ({count units grpb} >= 12); b1 sidechat "bla bla bla"

<span id='postcolor'>

but it doesnt seem to work

so does anyone have any suggestions or can it not be done?

thanks

Share this post


Link to post
Share on other sites

How about:

in init.sqs

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

bravoStart = count units grpb<span id='postcolor'>

in your radio script</span><table border="0" align="center" width="95%" cellpadding="3" cellspacing="1"><tr><td>Code Sample </td></tr><tr><td id="CODE">A1 sidechat "All stations, status check"

~2

if (count units grpb == bravoStart ) then {B1 sidechat "Bravo 1 all here";} else {B1 sidechat format ["Bravo 1 %1 lost",bravoStart - count units grpb];};

.

.

.<span id='postcolor'>

Share this post


Link to post
Share on other sites

either ive done something wrong or its not had the desired response, if any of the teams have a dead member, they fail to check in, at first i thought maybe the team leaders had died, but when i shot someone who i knew to be just a soldier it turns out i was wrong there...

thanks for the quick response though smile.gif

Share this post


Link to post
Share on other sites

ah yes, works now d'oh!

excelent smile.gif

after testing it a few times i hit another wall, your screwed if the group leader dies, any idea how i would have it so that the next person in the CoC would take over and report in?

eg, the Officer dies, the medic is B2 for example, so then he would radio the report instead...

Share this post


Link to post
Share on other sites

yeah, always grab the leader of the group:

leader grpb sidechat ....

smile.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  

×