hey my current map requires me to tell the people on the screen how far along their tank is built based on a number. The tank is 100% complete when the number is at 200, and 0% complete at 0, 50% at 100 and so on. Now i need a way to show this, and my current method is poor. Heres what i got
trigger show_allies_progress
{
accum 2 abort_if_less_than 10
wm_announce "The Allies are done 5% of their Tank!"
accum 2 abort_if_less_than 20
wm_announce "The Allies are done 10% of their Tank!"
accum 2 abort_if_less_than 30
wm_announce "The Allies are done 15% of their Tank!"
accum 2 abort_if_less_than 40
wm_announce "The Allies are done 20% of their Tank!"
accum 2 abort_if_less_than 50
wm_announce "The Allies are done 25% of their Tank!"
accum 2 abort_if_less_than 60
wm_announce "The Allies are done 30% of their Tank!"
accum 2 abort_if_less_than 70
wm_announce "The Allies are done 35% of their Tank!"
accum 2 abort_if_less_than 80
wm_announce "The Allies are done 40% of their Tank!"
accum 2 abort_if_less_than 90
wm_announce "The Allies are done 45% of their Tank!"
accum 2 abort_if_less_than 100
wm_announce "The Allies are done 50% of their Tank!"
accum 2 abort_if_less_than 110
wm_announce "The Allies are done 55% of their Tank!"
accum 2 abort_if_less_than 120
wm_announce "The Allies are done 60% of their Tank!"
accum 2 abort_if_less_than 130
wm_announce "The Allies are done 65% of their Tank!"
accum 2 abort_if_less_than 140
wm_announce "The Allies are done 70% of their Tank!"
accum 2 abort_if_less_than 150
wm_announce "The Allies are done 75% of their Tank!"
accum 2 abort_if_less_than 160
wm_announce "The Allies are done 80% of their Tank!"
accum 2 abort_if_less_than 170
wm_announce "The Allies are done 85% of their Tank!"
accum 2 abort_if_less_than 180
wm_announce "The Allies are done 90% of their Tank!"
accum 2 abort_if_less_than 190
wm_announce "The Allies are done 95% of their Tank!"
}
so you can see each side will get a mouthful of lines till it stops at the percent they have complete.
I need to figure a way so i can tell them in one line. The way i can think of is to
accum 2 trigger_if_equal 1 self 1_percent
accum 2 trigger_if_equal 2 self 2_percent
so you can see id have to create more than 400 lines of code to show that (not including all the brackets to start each #_percent part of the script.
so my question is can anyone think of a way that i can get it to display the exact (or clost to it) amount the team has of the tank complete in a smaller amount of script and ultimatly more efficient way?
(the variable for their progress is globalAcuum 2, just so you can work it into the script.)