• 🏆 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!
  • It's time for the first HD Modeling Contest of 2024. Join the theme discussion for Hive's HD Modeling Contest #6! Click here to post your idea!

Repairing Floating Texts

Status
Not open for further replies.
Level 30
Joined
Jan 31, 2010
Messages
3,551
Hey there. I got a trigger in my map, where when a building dies, you get gold. The system works, it displays proper messages, and it adds gold via trigger, but whenever I try to make a floating text that will be similar to normal gold gain, it either shows to other team, either doesn't works at all. How to make it displayable to the ones that get gold only? Also, is this optimization-able? This doesn't work for buildings other than Den of Wonders nd Poseidon Shrine.
  • Buildings Text Gold
    • Events
      • Unit - A unit Dies
    • Conditions
      • Or - Any (Conditions) are true
        • Conditions
          • (Unit-type of (Dying unit)) Equal to |cff1FBF00Ancient Defender - level 1
          • (Unit-type of (Dying unit)) Equal to |cff1FBF00Ancient Defender - level 2
          • (Unit-type of (Dying unit)) Equal to |cff1FBF00Ancient Defender - level 3
          • (Unit-type of (Dying unit)) Equal to |cff08C5FFPoseidon Shrine
          • (Unit-type of (Dying unit)) Equal to |cff1FBF00Den of Wonders
          • (Unit-type of (Dying unit)) Equal to |cff08C5FFSea Guardian - level 1
          • (Unit-type of (Dying unit)) Equal to |cff08C5FFSea Guardian - level 2
          • (Unit-type of (Dying unit)) Equal to |cff08C5FFSea Guardian - level 3
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Unit-type of (Dying unit)) Equal to |cff08C5FFPoseidon Shrine
        • Then - Actions
          • Game - Display to (All players) for 10.00 seconds the text: The Elune's Warrior...
          • Set GoldInteger = (324 + (Random integer number between 1 and 100))
          • Player Group - Pick every player in PlayersElvesPlaying and do (Actions)
            • Loop - Actions
              • Player - Add GoldInteger to (Picked player) Current gold
              • Set Deny_Floating = (Position of (Dying unit))
              • Floating Text - Create floating text that reads (|cffffcc00+ + ((String(GoldInteger)) + |r)) at Deny_Floating with Z offset 0.00, using font size 10.00, color (100.00%, 100.00%, 100.00%), and 0.00% transparency
              • Set Deny_Floating_Text = (Last created floating text)
              • Floating Text - Hide Deny_Floating_Text for (All players)
              • Floating Text - Show Deny_Floating_Text for PlayersElvesPlaying
              • Floating Text - Change Deny_Floating_Text: Disable permanence
              • Floating Text - Change the lifespan of Deny_Floating_Text to 2.00 seconds
              • Floating Text - Change the fading age of Deny_Floating_Text to 1.00 seconds
              • Floating Text - Set the velocity of Deny_Floating_Text to 80.00 towards 90.00 degrees
          • Player - Set the current research level of Creep Upgrade Extreme to 1 for Player 1 (Red)
        • Else - Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Unit-type of (Dying unit)) Equal to |cff1FBF00Den of Wonders
        • Then - Actions
          • Game - Display to (All players) for 10.00 seconds the text: The Azshara's Slaye...
          • Set GoldInteger = (324 + (Random integer number between 1 and 100))
          • Player Group - Pick every player in PlayersOrcPlaying and do (Actions)
            • Loop - Actions
              • Player - Add GoldInteger to (Picked player) Current gold
              • Set Deny_Floating = (Position of (Dying unit))
              • Floating Text - Create floating text that reads (|cffffcc00+ + ((String(GoldInteger)) + |r)) at Deny_Floating with Z offset 0.00, using font size 10.00, color (100.00%, 100.00%, 100.00%), and 0.00% transparency
              • Set Deny_Floating_Text = (Last created floating text)
              • Floating Text - Hide Deny_Floating_Text for (All players)
              • Floating Text - Show Deny_Floating_Text for PlayersOrcPlaying
              • Floating Text - Change Deny_Floating_Text: Disable permanence
              • Floating Text - Change the lifespan of Deny_Floating_Text to 2.00 seconds
              • Floating Text - Change the fading age of Deny_Floating_Text to 1.00 seconds
              • Floating Text - Set the velocity of Deny_Floating_Text to 80.00 towards 90.00 degrees
          • Player - Set the current research level of Creep Upgrade Extreme to 1 for Player 5 (Yellow)
        • Else - Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • ((Owner of (Killing unit)) is an enemy of (Owner of (Dying unit))) Equal to True
          • (Unit-type of (Dying unit)) Not equal to |cff08C5FFPoseidon Shrine
          • (Unit-type of (Dying unit)) Not equal to |cff1FBF00Den of Wonders
        • Then - Actions
          • Game - Display to (All players) for 10.00 seconds the text: ((PlayerColors[(Player number of (Owner of (Killing unit)))] + ((Name of (Owner of (Killing unit))) + |r )) + has demolished a tower.)
          • Set GoldInteger = (274 + (Random integer number between 51 and 200))
          • Player Group - Pick every player in (All players matching (((Matching player) is an ally of (Owner of (Killing unit))) Equal to True)) and do (Actions)
            • Loop - Actions
              • Player - Add GoldInteger to (Picked player) Current gold
          • Set Deny_Floating = (Position of (Dying unit))
          • Floating Text - Create floating text that reads (|cffffcc00+ + ((String(GoldInteger)) + |r)) at Deny_Floating with Z offset 0.00, using font size 10.00, color (100.00%, 100.00%, 100.00%), and 0.00% transparency
          • Set Deny_Floating_Text = (Last created floating text)
          • Floating Text - Hide Deny_Floating_Text for (All players)
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • Or - Any (Conditions) are true
                • Conditions
                  • ((Owner of (Killing unit)) is in PlayersElves) Equal to True
                  • ((Owner of (Killing unit)) is in PlayersElvesLeft) Equal to True
                  • ((Owner of (Killing unit)) is in PlayersElvesPlaying) Equal to True
            • Then - Actions
              • Floating Text - Show Deny_Floating_Text for (All players matching (((Picked player) is in PlayersElvesPlaying) Equal to True))
            • Else - Actions
              • Floating Text - Show Deny_Floating_Text for (All players matching (((Picked player) is in PlayersOrcPlaying) Equal to True))
          • Floating Text - Change Deny_Floating_Text: Disable permanence
          • Floating Text - Change the lifespan of Deny_Floating_Text to 2.00 seconds
          • Floating Text - Change the fading age of Deny_Floating_Text to 1.00 seconds
          • Floating Text - Set the velocity of Deny_Floating_Text to 80.00 towards 90.00 degrees
        • Else - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • ((Owner of (Killing unit)) is an enemy of (Owner of (Dying unit))) Equal to False
              • (Unit-type of (Dying unit)) Not equal to |cff08C5FFPoseidon Shrine
              • (Unit-type of (Dying unit)) Not equal to |cff1FBF00Den of Wonders
            • Then - Actions
              • Game - Display to (All players) for 10.00 seconds the text: ((PlayerColors[(Player number of (Owner of (Killing unit)))] + ((Name of (Owner of (Killing unit))) + |r )) + has denied a tower.)
              • Set GoldInteger = (149 + (Random integer number between 1 and 100))
              • Player Group - Pick every player in (All players matching (((Picked player) is an ally of (Owner of (Killing unit))) Equal to False)) and do (Actions)
                • Loop - Actions
                  • Player - Add GoldInteger to (Picked player) Current gold
              • Set Deny_Floating = (Position of (Dying unit))
              • Floating Text - Create floating text that reads (|cffffcc00+ + ((String(GoldInteger)) + |r)) at Deny_Floating with Z offset 0.00, using font size 10.00, color (100.00%, 100.00%, 100.00%), and 0.00% transparency
              • Set Deny_Floating_Text = (Last created floating text)
              • Floating Text - Hide Deny_Floating_Text for (All players)
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • Or - Any (Conditions) are true
                    • Conditions
                      • ((Owner of (Killing unit)) is in PlayersElves) Equal to True
                      • ((Owner of (Killing unit)) is in PlayersElvesLeft) Equal to True
                      • ((Owner of (Killing unit)) is in PlayersElvesPlaying) Equal to True
                • Then - Actions
                  • Floating Text - Show Deny_Floating_Text for (All players matching (((Matching player) is in PlayersOrcPlaying) Equal to True))
                • Else - Actions
                  • Floating Text - Show Deny_Floating_Text for (All players matching (((Matching player) is in PlayersElvesPlaying) Equal to True))
              • Floating Text - Change Deny_Floating_Text: Disable permanence
              • Floating Text - Change the lifespan of Deny_Floating_Text to 2.00 seconds
              • Floating Text - Change the fading age of Deny_Floating_Text to 1.00 seconds
              • Floating Text - Set the velocity of Deny_Floating_Text to 80.00 towards 90.00 degrees
            • Else - Actions
 
Status
Not open for further replies.
Top