RogueRunner 0 Posted February 21, 2007 Ok so I'm a scripting n00b and I need to clear a town of baddies but leave the civvies intact, lets say 70% of them alive. Two questions. How do I do this, obviously with a trigger (I hope ) and get a message saying 'Damage to high, yadda yadda yadda your a bad soldier' I have a trigger currently looking for bad guys in a huge circle around the town. As soon as it sense none in the circle it abrutly stops and give me my score. How do I do it so that you continue flying/playing with just a message popping up in the center of the screen telling you you have won? Share this post Link to post Share on other sites
RogueRunner 0 Posted February 21, 2007 My orignal problem was that the trigger circles overlapped and then one of them did not work. When I changed it so that the one is smaller than the other and none of the circle lines crossed both triggers work. Now my problem is just how to make it to detect that 30% if the civs were killed and not the 'once, not present' thing Share this post Link to post Share on other sites
talkinBEERmug 0 Posted February 21, 2007 Im a noob to scripting in arma too, but I have done some coding in the past. Â The way I would do this in the coding is make an if statment. Example if Civ1 dead +1 do that for each civ, then have another if statment if 40 hit(40 dead civ) then call mission end. Â you would have to put this in the loop.sqs i think. Now I know the basic how to do it, but I have no idea how to get it to work in arma. Â But I think that would be the best way to do it in arma, mayb some one can plug in the right commands and just use that +1 idea. Sorry could not be of more help. Share this post Link to post Share on other sites
charonos 0 Posted February 21, 2007 There is no trigger option or editor accessible function like that. So if you have never written a script, there is unfortunately no way, you can achieve exactly what you want. You would actually have to write a script that counts all civilians and calculates the percentage of dead civilians from the total number of civilians: So let's say your trigger feeds a list array named "townarray" then it can be like: <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE"> _totalcivs={side _x==civilian} count townarray _deadcivs={(not alive _x) and (side _x==civilian)} count townarray _percentage=(_deadcivs/_totalcivs)*100 The list array is stated in the condition field of the trigger like: <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE"> townarray=thisList See if that gets you further. EDIT: Dead soldier of the west,east side in the trigger might distort the total number, because they are for some reason made civilians after they die. But if no soldiers die in your case, then you are fine. Share this post Link to post Share on other sites
RogueRunner 0 Posted February 21, 2007 That made whooooosh as it went by Thanx for the help guys but looks like it's not meant to be Share this post Link to post Share on other sites