ADuke 1 Posted March 3, 2009 Hello, I have a mission that has one objective = To destroy AA emplacements on the island/map. Instead of having a list of vehicles for the player to destroy. I would like the player to have to seek out these vehicles (AA trucks) and destroy them. When they are destroyed, instead of an objective completing I would like a message to appear saying "You have destroyed (number) AA emplacements" and then when they are all found and destroyed, the objective would complete and the mission would end. I know how to set up the objectives but what I am having trouble with is the message displaying properly with the correct count of destroyed vehicles, I know it has something to do with the "Format" command. Any help is appreciated. Share this post Link to post Share on other sites
.kju 3245 Posted March 3, 2009 1) attach ArmA:_Event_Handlers#Killed to these units 2) make them count the kills in a global variable: <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">init.sqf MyTag_numberOfUnitsKilled = 0; // KEH code MyTag_numberOfUnitsKilled = MyTag_numberOfUnitsKilled + 1; You may have to keep locality and JIP in mind. Share this post Link to post Share on other sites
ADuke 1 Posted March 3, 2009 OK, so I have: MyTag_numberOfUnitsKilled = 0; In my init.sqf I also have a trigger with: Condition = not alive aa1 On Activation = MyTag_numberOfUnitsKilled = MyTag_numberOfUnitsKilled + 1 Now how do I get a message to display saying that I have killed 1 AA emplacement? Share this post Link to post Share on other sites
ADuke 1 Posted March 3, 2009 Nevermind, figured it out, here's my trigger's OnActivation field= <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">MyTag_numberOfUnitsKilled = MyTag_numberOfUnitsKilled + 1; hint format["You have destroyed %1% AA emplacements", mytag_numberofunitskilled] Share this post Link to post Share on other sites
ADuke 1 Posted March 3, 2009 Nevermind, figured it out, here's my trigger's OnActivation field=<table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">MyTag_numberOfUnitsKilled = MyTag_numberOfUnitsKilled + 1; hint format["You have destroyed %1% AA emplacements", mytag_numberofunitskilled] Actually that did'nt work, help please. Share this post Link to post Share on other sites
.kju 3245 Posted March 3, 2009 try Quote[/b] ]hint format["You have destroyed %1 AA emplacements", mytag_numberofunitskilled] Share this post Link to post Share on other sites
ADuke 1 Posted March 4, 2009 tryQuote[/b] ]hint format["You have destroyed %1 AA emplacements", mytag_numberofunitskilled] Worked like a charm, thanks a lot Q On a side note: Is it possible to have a counter on the briefing screen that will update and display the # of AA emplacements that have been destroyed? I am thinking about also adding weapon caches as things that need to be destroyed as well and would like to add counters for each type of thing. Thanks again Share this post Link to post Share on other sites