2008-07-10, 18:08:48
TKF Wrote:What if you could implement a Damage Display system?
You could type -dd (-damagadisplay) in order to activate the system in a game. I don't think the tanks uses ingame custom unit value. This system is very simple and even takes regeneration, armor and Damage reduction into the math indirectly. (that's because 1 sec periodic delay). The display system shows total Damage taken pr second.
Some players may find this annoying, so I suggest this is a non-mode and can be deactivated at any time if needed. Maybe this would be a good addition to 8.49?
This is similar to my trigger used in naval battle.Code:Damage Display System
Events
Time - Every 1.00 seconds of game time
Conditions
Actions
For each (Integer A) from 1 to 12, do (Actions)
Loop - Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(Tank_Player[(Integer A)] is alive) Equal to True
Tank_Player[(Integer A)] Not equal to No unit
(Custom value of Tank_Player[(Integer A)]) Greater than (Integer((Life of Tank_Player[(Integer A)])))
Then - Actions
Set DamageDifference = ((Custom value of Tank_Player[(Integer A)]) - (Integer((Life of Tank_Player[(Integer A)]))))
Floating Text - Create floating text that reads (- + (String(DamageDifference))) above Tank_Player[(Integer A)] with Z offset 0.00, using font size 10.00, color (100.00%, 8.00%, 8.00%), and 0.00% transparency
Floating Text - Set the velocity of (Last created floating text) to 60.00 towards 270.00 degrees
Floating Text - Change (Last created floating text): Disable permanence
Floating Text - Change the fading age of (Last created floating text) to 1.00 seconds
Floating Text - Change the lifespan of (Last created floating text) to 1.20 seconds
Unit - Set the custom value of Tank_Player[(Integer A)] to (Integer((Life of Tank_Player[(Integer A)])))
Set DamageDifference = 0
Else - Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(Tank_Player[(Integer A)] is alive) Equal to True
Tank_Player[(Integer A)] Not equal to No unit
(Custom value of Tank_Player[(Integer A)]) Less than (Integer((Life of Tank_Player[(Integer A)])))
Then - Actions
Unit - Set the custom value of Tank_Player[(Integer A)] to (Integer((Life of Tank_Player[(Integer A)])))
Else - Actions
hmmm, very interesting. it's a cool trigger, i definately like it.
but why is it 12 tanks players and not 10? "For each (Integer A) from 1 to 12, do (Actions)" who's driving those last 2 tanks anyways?
"(Custom value of Tank_Player[(Integer A)]) Greater than (Integer((Life of Tank_Player[(Integer A)])))" this variable array is a real number, i'm thinking u should change it to an integer variable and do the conversion from real to int when assigning it's value. that should use up less precious ram memory if i'm not mistaken. am i wrong?
i've only used floating text one time when i was checking how aquisition range affects creeps but are u sure that u need all these? " Floating Text - Set the velocity of (Last created floating text) to 60.00 towards 270.00 degrees
Floating Text - Change (Last created floating text): Disable permanence
Floating Text - Change the fading age of (Last created floating text) to 1.00 seconds
Floating Text - Change the lifespan of (Last created floating text) to 1.20 seconds" i'm too lazy to test it. i'm just wondering if u need to use 5 actions for creating the text.
if...
"(Custom value of Tank_Player[(Integer A)]) Greater than (Integer((Life of Tank_Player[(Integer A)])))"
"(Custom value of Tank_Player[(Integer A)]) Less than (Integer((Life of Tank_Player[(Integer A)])))"
why not just delete both of those? and then u could just delete all of this too:
"Else - Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(Tank_Player[(Integer A)] is alive) Equal to True
Tank_Player[(Integer A)] Not equal to No unit
(Custom value of Tank_Player[(Integer A)]) Less than (Integer((Life of Tank_Player[(Integer A)])))
Then - Actions
Unit - Set the custom value of Tank_Player[(Integer A)] to (Integer((Life of Tank_Player[(Integer A)])))
Else - Actions"
then it would just show gain and minus instead.
my roomate, perplexed is gonna love u btw, he was going to write a trigger that let the player who took the most damage over a certain time interval get a bonus for being the best tanker in his hero arena map. but it looks like you've done it for him.
Why's the rothchild family crest and the illuminati symbol on my 1 dollar bill? Why do rich and powerful American "christian" leaders have gay sex and worship a giant 40 foot stone owl at Beach Grove every year? Why doesn't anyone care?