• 🏆 Texturing Contest #33 is OPEN! Contestants must re-texture a SD unit model found in-game (Warcraft 3 Classic), recreating the unit into a peaceful NPC version. 🔗Click here to enter!

Help on new map

Status
Not open for further replies.
Level 12
Joined
Dec 17, 2009
Messages
951
hello guyz
I need that trigger working.
Anyone can set it for me


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

Sorry bad english.
Ty so much :sad:
.VTZ.
 
Level 9
Joined
Oct 11, 2009
Messages
477
Set the velocity of the trigger to 64 towards 90.00 degrees which is North because the floating text instead go up above the attacked unit, it will go down below (South = 270.00 degrees) and add an action at the last part of the trigger Floating Text - Destroy (Last created floating text) to avoid leaks.
 
I don't actually see anything wrong, but I would optimize it like this:
  • Damage Display System
  • Events
    • Time - Every 1.00 seconds of game time
  • Conditions
    • (Tank_Player[(Integer A)] is alive) Equal to True
    • Tank_Player[(Integer A)] Not equal to No unit
  • 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
            • (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
            • Unit - Set the custom value of Tank_Player[(Integer A)] to (Integer((Life of Tank_Player[(Integer A)])))
P.S. Your lifespan and fading age of the floating text are really low values, try at least 3.00 seconds and 2.00 seconds respectively.
If this still doesn't work, you need to add some wait action (or, even better some timer) before the "Unit - Set the custom value of Tank_Player[(Integer A)] to (Integer((Life of Tank_Player[(Integer A)])))" action, on the "Then" branch.
 
Level 9
Joined
Oct 11, 2009
Messages
477
But is it 270.00 degrees in WC3 World Editor is South? If you set the velocity with speed of 60.00 and towards 270.00 degrees then the text will head to South instead of going to the North, so I should say set the angle of the velocity to 90.00 degrees. Because the floating text that he created is like the somewhat damage text or something like of Critical Strike.
 
Status
Not open for further replies.
Top