• Listen to a special audio message from Bill Roper to the Hive Workshop community (Bill is a former Vice President of Blizzard Entertainment, Producer, Designer, Musician, Voice Actor) 🔗Click here to hear his message!
  • Read Evilhog's interview with Gregory Alper, the original composer of the music for WarCraft: Orcs & Humans 🔗Click here to read the full interview.
  • Create a faction for Warcraft 3 and enter Hive's 19th Techtree Contest: Co-Op Commanders! Click here to enter!
  • Create a void inspired texture for Warcraft 3 and enter Hive's 34th Texturing Contest: Void! Click here to enter!
  • The Hive's 21st Texturing Contest: Upgrade is now concluded, time to vote for your favourite set of icons! Click here to vote!

Floating Text...

Status
Not open for further replies.
Level 11
Joined
Jul 28, 2007
Messages
920
Ok i have problem, dunno how to solve it...
When unit enters region, every 1 seconds floating text must appear over unit, as long unit is in region, when it leaves region counting must stop. But i have there few bugs, if u enter, leave, enter fast there's some bug issues...


Alien right is just 0/1 var, that detects if it is activated.


  • Dereneration right
    • Events
      • Unit - A unit enters arena right <gen>
    • Conditions
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • Or - Any (Conditions) are true
            • Conditions
              • (Owner of (Entering unit)) Equal to Player 1 (Red)
              • (Owner of (Entering unit)) Equal to Player 2 (Blue)
              • (Owner of (Entering unit)) Equal to Player 3 (Teal)
        • Then - Actions
          • Set alien_right[(Player number of (Owner of (Entering unit)))] = 1
          • Game - Display to (Owner of (Entering unit)), at offset (0.00, 0.00) for 2.00 seconds the text: |CFFED1C24Entering ...
          • -------- Float texts --------
          • Floating Text - Create floating text that reads 5 above (Entering unit) with Z offset 0.00, using font size 10.00, color (100.00%, 0.00%, 0.00%), and 0.00% transparency
          • Floating Text - Change (Last created floating text): Disable permanence
          • Floating Text - Change the lifespan of (Last created floating text) to 2.00 seconds
          • Floating Text - Change the fading age of (Last created floating text) to 1.00 seconds
          • Floating Text - Set the velocity of (Last created floating text) to 60.00 towards 90.00 degrees
          • Wait 1.00 seconds
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • alien_right[(Player number of (Owner of (Entering unit)))] Equal to 1
            • Then - Actions
              • Floating Text - Create floating text that reads 4 above (Entering unit) with Z offset 0.00, using font size 10.00, color (100.00%, 0.00%, 0.00%), and 0.00% transparency
              • Floating Text - Change (Last created floating text): Disable permanence
              • Floating Text - Change the lifespan of (Last created floating text) to 7.00 seconds
              • Floating Text - Change the fading age of (Last created floating text) to 2.00 seconds
              • Floating Text - Set the velocity of (Last created floating text) to 60.00 towards 90.00 degrees
            • Else - Actions
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • alien_right[(Player number of (Owner of (Entering unit)))] Not equal to 1
                • Then - Actions
                  • Skip remaining actions
                • Else - Actions
          • Wait 1.00 seconds
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • alien_right[(Player number of (Owner of (Entering unit)))] Equal to 1
            • Then - Actions
              • Floating Text - Create floating text that reads 3 above (Entering unit) with Z offset 0.00, using font size 10.00, color (100.00%, 0.00%, 0.00%), and 0.00% transparency
              • Floating Text - Change (Last created floating text): Disable permanence
              • Floating Text - Change the lifespan of (Last created floating text) to 7.00 seconds
              • Floating Text - Change the fading age of (Last created floating text) to 2.00 seconds
              • Floating Text - Set the velocity of (Last created floating text) to 60.00 towards 90.00 degrees
            • Else - Actions
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • alien_right[(Player number of (Owner of (Entering unit)))] Not equal to 1
                • Then - Actions
                  • Skip remaining actions
                • Else - Actions
          • Wait 1.00 seconds
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • alien_right[(Player number of (Owner of (Entering unit)))] Equal to 1
            • Then - Actions
              • Floating Text - Create floating text that reads 2 above (Entering unit) with Z offset 0.00, using font size 10.00, color (100.00%, 0.00%, 0.00%), and 0.00% transparency
              • Floating Text - Change (Last created floating text): Disable permanence
              • Floating Text - Change the lifespan of (Last created floating text) to 7.00 seconds
              • Floating Text - Change the fading age of (Last created floating text) to 2.00 seconds
              • Floating Text - Set the velocity of (Last created floating text) to 60.00 towards 90.00 degrees
            • Else - Actions
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • alien_right[(Player number of (Owner of (Entering unit)))] Not equal to 1
                • Then - Actions
                  • Skip remaining actions
                • Else - Actions
          • Wait 1.00 seconds
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • alien_right[(Player number of (Owner of (Entering unit)))] Equal to 1
            • Then - Actions
              • Floating Text - Create floating text that reads 1 above (Entering unit) with Z offset 0.00, using font size 10.00, color (100.00%, 0.00%, 0.00%), and 0.00% transparency
              • Floating Text - Change (Last created floating text): Disable permanence
              • Floating Text - Change the lifespan of (Last created floating text) to 7.00 seconds
              • Floating Text - Change the fading age of (Last created floating text) to 2.00 seconds
              • Floating Text - Set the velocity of (Last created floating text) to 60.00 towards 90.00 degrees
            • Else - Actions
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • alien_right[(Player number of (Owner of (Entering unit)))] Not equal to 1
                • Then - Actions
                  • Skip remaining actions
                • Else - Actions
          • Wait 1.00 seconds
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • alien_right[(Player number of (Owner of (Entering unit)))] Equal to 1
            • Then - Actions
              • Unit - Add deregrration to (Entering unit)
            • Else - Actions
          • -------- Float texts ends --------
        • Else - Actions
 
Last edited by a moderator:
Status
Not open for further replies.
Top