• Check out the results of the Techtree Contest #19!
  • 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 void inspired texture for Warcraft 3 and enter Hive's 34th Texturing Contest: Void! Click here to enter!
  • The Hive's 22nd Icon Contest: Creep Abilities is now concluded, time to vote for your favourite set of icons! Click here to vote!

[Trigger] Minor trigger issue, floating text not working properly.

Status
Not open for further replies.

McLovin

M

McLovin

Hi!

The following trigger is supposed to create a floating text over a unit every 10 seconds, but only as long as the unit is on the map. For some reason the floating text is created in the center of the map in the beginning of the game, even though the condition isn't fulfilled (nobody has got the unit yet). As soon as a player gets the unit, where the text is supposed to be, the problem is solved and the text is displayed at the correct position.

  • Eriks Tower
    • Events
      • Time - Every 10.00 seconds of game time
    • Conditions
    • Actions
      • Set Temp_Group = (Units of type Gåård's Cubade Morsa (Erik))
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • ((Playable map area) contains (Random unit from Temp_Group)) Equal to True
        • Then - Actions
          • Floating Text - Create floating text that reads Eriks_Tower[(Random integer number between 1 and 14)] above (Random unit from Temp_Group) with Z offset 0.00, using font size 7.00, color (100.00%, 0.00%, 0.00%), and 0.00% transparency
          • Wait 5.00 seconds
          • Floating Text - Destroy (Last created floating text)
        • Else - Actions
          • Do nothing
      • Custom script: call DestroyGroup (udg_Temp_Group)
Guess that the condition isn't working properly. Anyone who can tell me what's wrong or what condition I should pick?

Regards,

McLovin
 
Last edited by a moderator:
  • Create Text
    • Events
      • Time - Every 10.00 seconds of game time
    • Conditions
    • Actions
      • Custom script: set bj_wantDestroyGroup = true
      • Unit Group - Pick every unit in (Units of type Footman) and do (Actions)
        • Loop - Actions
          • Multiple FunctionsIf (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • ((Playable map area) contains (Picked unit)) Equal to (==) True
            • Then - Actions
              • Floating Text - Create floating text that reads blah above (Picked unit) with Z offset 0.00, using font size 10.00, color (100.00%, 100.00%, 100.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 5.00 seconds
            • Else - Actions
This will generally do what you want. Will work for one unit and for as much as you want.
 
Status
Not open for further replies.
Back
Top