nam_viet 0 Posted August 6, 2004 Hello sorry for that bad english ;) I am trying to display the number of units alive in the side west in a hint message: 1st thing a put a trigger on west present and on activation: wnumber=count thislist ;hint"%wnumber" but it display %wnumber can you help me please ? ps: is it possible to get percent number of unit is alive in west side in a message ? eg: 85% west soldiers are alive Share this post Link to post Share on other sites
Blanco 0 Posted August 6, 2004 try this in the onactivation field of your WEST present trigger : <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE"> hint format ["%1 WEST soldiers are alive",count thislist] Share this post Link to post Share on other sites
nam_viet 0 Posted August 6, 2004 nice Blanco it works !!!! 10 times thanks ! Share this post Link to post Share on other sites
nam_viet 0 Posted August 6, 2004 I would like to run it in a script <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">#start ~1 hint format ["%1 U.S dispo",count thislist] ? not alive player:goto "exit" ~5 goto "start" #exit this one works but I would like get a message like that: 28 West 34 East can you help me with that ? Share this post Link to post Share on other sites
Blanco 0 Posted August 6, 2004 that's a nasty *BLING* every 6 seconds... Man, I guess you don't play with headphones.  ok... Use the countside command instead : <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE"> hint format ["WEST %1\nEAST %2",WEST countside thislist,EAST countside thislist] in the onact of ur trig  Or via chat : <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE"> Player globalchat format ["WEST %1\nEAST %2",WEST countside thislist,EAST countside thislist] ...or onscreen via titletext <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE"> Titletext [format["WEST %1\nEAST %2",WEST countside thislist,EAST countside thislist],"PLAIN DOWN"] Note : A vehicle will be counted as 1, the crew inside is not counted. Share this post Link to post Share on other sites
nam_viet 0 Posted August 6, 2004 Thanks Blanco  this is nice  but in my script Est is always on "O" and West works fine is it a game bug ? but via a trigger it works but dispay it one time  only same for radio,hint, title ps: a globale channel radio is pretty much quiet  <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">#start ~1 Player globalchat format ["WEST %1--------EAST %2",WEST countside thislist,EAST countside thislist] ? not alive player:goto "exit" ~10 goto "start" #exit Share this post Link to post Share on other sites
Blanco 0 Posted August 6, 2004 Make sure your trigger covers the whole map,m8 Place Radio trigger Alpha  , repeatedly and in the onact field that code again: Player globalchat format ["WEST %1--------EAST %2",WEST countside thislist,EAST countside thislist] should work Share this post Link to post Share on other sites
BoweryBaker 0 Posted August 7, 2004 Is there a way that i can get the computer to detect if there is only one person on a squad left alive and if there is to play a special song, possibly easily through a trigger? Share this post Link to post Share on other sites
korax 4 Posted August 7, 2004 <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">Count units group1 == 1 Something like that in a triggers condition field? Share this post Link to post Share on other sites
MrZig 0 Posted August 7, 2004 Or better yet, this way <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">"alive _X" Count units group1 == 1 This counts the alive units, using Korax's method might take awhile for the game to recognise that only 1 unit is left. Share this post Link to post Share on other sites