TextTag "CC Duration" Bar

WolfieeifloW

WEHZ Helper
Reaction score
372
It shows a bar with 15 |, when it should be showing 30 |.
And it doesn't go away, it just stays there forever.
Trigger:
  • Untitled Trigger 001
    • Events
    • Unit - A unit Begins casting an ability
    • Conditions
    • Actions
    • Set cccString = |c00FFFFFF|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||r
    • Floating Text - Create floating text that reads cccString above (Target unit of ability being cast) with Z offset 0.00, using font size 10.00, color (100.00%, 100.00%, 100.00%), and 0.00% transparency
    • Set cccBar = (Last created floating text)
    • Set cccInt = 30
    • Trigger - Run Untitled Trigger 002 <gen> (checking conditions)

Initially set off:
Trigger:
  • Untitled Trigger 002
    • Events
    • Time - Every 0.10 seconds of game time
    • Conditions
    • Actions
    • Multiple FunctionsIf (All Conditions are True) then do (Then Actions) else do (Else Actions)
    • If - Conditions
    • cccInt Greater than (>) 0
    • Then - Actions
    • Floating Text - Change text of cccBar to (Substring(cccString, 1, cccInt)) using font size 10.00
    • Set cccInt = (cccInt - 1)
    • Else - Actions
    • Floating Text - Change cccBar: Disable permanence
    • Floating Text - Change the lifespan of cccBar to 0.00 seconds
    • Trigger - Turn off (This trigger)
 

Accname

2D-Graphics enthusiast
Reaction score
1,462
Put some print messages in those triggers and try to find out what happens.

By the way, your text may have 30 '|' characters in it, but it has more then 30 characters in total.
The |c00ffffff is also counted to the length of the string so its obvious why you dont get your desired string shown.
 

vypur85

Hibernate
Reaction score
803
To add on, using the character '|' may not be such a good idea, depending on situation.
They tend to stack on one another (or just being too close to each other). So when you change the colour of the text, it's hard to see the effect. And it may look lesser than than it actually is.

Using the capital 'I' could be a better choice.
Then again, as I mentioned, this is pretty much situational.
 
General chit-chat
Help Users
  • No one is chatting at the moment.

      The Helper Discord

      Staff online

      Members online

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top