Floating Text Question

Crusher

You can change this now in User CP.
Reaction score
121
In this small trigger it is supposed to add a color each time when a new combo point is gained.

So, the combo point one will be green, combo point two will be yellow, three will be orange, four and five etc.

But, the problem is, only combo one, two and five are defined!

Trigger:
  • Add Points
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to Silenced Strike
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • Current_Points Equal to 0
          • Current_Unit_With_Points Equal to No unit
        • Then - Actions
          • Set Current_Points = (Current_Points + 1)
          • Set Current_Unit_With_Points = (Target unit of ability being cast)
          • Floating Text - Create floating text that reads (((|c0000ff40Combo Point:|r + + (String(Current_Points))) + )) above (Casting unit) with Z offset 0.00, using font size 8.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
          • Floating Text - Change the fading age of (Last created floating text) to 0.00 seconds
          • Floating Text - Set the velocity of (Last created floating text) to 64.00 towards 90.00 degrees
        • Else - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • Current_Points Less than 4
              • Current_Unit_With_Points Equal to (Target unit of ability being cast)
            • Then - Actions
              • Set Current_Points = (Current_Points + 1)
              • Floating Text - Create floating text that reads (((|c00ffff00Combo Points:|r + + (String(Current_Points))) + )) above (Casting unit) with Z offset 0.00, using font size 9.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
              • Floating Text - Change the fading age of (Last created floating text) to 0.00 seconds
              • Floating Text - Set the velocity of (Last created floating text) to 64.00 towards 90.00 degrees
            • Else - Actions
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • Current_Points Greater than or equal to 1
                  • Current_Unit_With_Points Not equal to (Target unit of ability being cast)
                • Then - Actions
                  • Set Current_Points = 0
                • Else - Actions
                  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    • If - Conditions
                      • Current_Points Equal to 5
                      • Current_Unit_With_Points Equal to (Target unit of ability being cast)
                    • Then - Actions
                      • Floating Text - Create floating text that reads (((|c00ff8000Combo Points:|r + + (String(Current_Points))) + )) above (Casting 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
                      • Floating Text - Change the fading age of (Last created floating text) to 0.00 seconds
                      • Floating Text - Set the velocity of (Last created floating text) to 64.00 towards 90.00 degrees
                    • Else - Actions
                      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                        • If - Conditions
                          • Current_Points Equal to 4
                        • Then - Actions
                          • Set Current_Points = (Current_Points + 1)
                          • Floating Text - Create floating text that reads (((|c00ff0000Combo Points:|r + + (String(Current_Points))) + )) above (Casting unit) with Z offset 0.00, using font size 11.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
                          • Floating Text - Change the fading age of (Last created floating text) to 0.00 seconds
                          • Floating Text - Set the velocity of (Last created floating text) to 64.00 towards 90.00 degrees
                        • Else - Actions


Trigger:
  • Add Points Two
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to Silenced Strike
      • Current_Unit_With_Points Not equal to (Target unit of ability being cast)
      • Current_Unit_With_Points Not equal to No unit
    • Actions
      • Set Current_Points = 1
      • Set Current_Unit_With_Points = (Target unit of ability being cast)
      • Floating Text - Create floating text that reads (((|c0000ff40Combo Point:|r + + (String(Current_Points))) + )) above (Casting unit) with Z offset 0.00, using font size 8.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
      • Floating Text - Change the fading age of (Last created floating text) to 0.00 seconds
      • Floating Text - Set the velocity of (Last created floating text) to 64.00 towards 90.00 degrees
 
I think it'd be best to separate each If condition, so that you have 5 of them separately, not connected by Else. I think it's conflicting with one another.
 
I think it'd be best to separate each If condition, so that you have 5 of them separately, not connected by Else. I think it's conflicting with one another.

Nah, doesn't work (tried).

Also, that's not so big deal, I want to add something new to this:

So, because this hero is based on combo points, I would likely add an ulti which will increase the combo point maximum availability. Let's say now we can have 5 combo points maximum. But, when you raise your ulti, and the trigger checks what is the level of the ulti, it makes capacity to 7, for level 2 ulti = 9 and so on.

Any idea how to do this?
 
What's the point of having the same code that defines how it moves and when it disappears? Why not just have a few lines that do the color in an IF statement and the rest on the outside?
 
Could you show me an example, please?
Would look something like:
Code:
Event
 Unit - A unit Starts the effect of an ability
Conditions
 (Ability being cast) Equal to Silenced Strike
Event
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
    If - Conditions
        ComboPoints equal 1
    Then - Actions
        Set ColorTag equal lsdf000
    Else - Actions
 Floating Text - Create floating text that reads (((ColorTag  + (String(Current_Points))) + )) above (Casting unit) with Z offset 0.00, using font size 8.00, color (100.00%, 100.00%, 100.00%), and 0.00% transparency

You repeat the if for how many combo points you want and how many colours you want corresponding. ColorTag is a string that olds the front end of the ColorCode, the end of it goes in there somewhere. The code is just a quick write up of what it would look like.
 
Trigger:
  • Add Points Copy
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to Silenced Strike
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • Current_Points Equal to 0
          • Current_Unit_With_Points Equal to No unit
        • Then - Actions
          • Set ColorString[1] = (|c0000ff40Combo Point:|r +
          • Set Current_Points = (Current_Points + 1)
          • Set Current_Unit_With_Points = (Target unit of ability being cast)
          • Floating Text - Create floating text that reads ((ColorString[1] + (String(Current_Points))) + )) above (Casting unit) with Z offset 0.00, using font size 8.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
          • Floating Text - Change the fading age of (Last created floating text) to 0.00 seconds
          • Floating Text - Set the velocity of (Last created floating text) to 64.00 towards 90.00 degrees
        • Else - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • Current_Points Less than 4
              • Current_Unit_With_Points Equal to (Target unit of ability being cast)
            • Then - Actions
              • Set ColorString[2] = (|c00ffff00Combo Points:|r +
              • Set Current_Points = (Current_Points + 1)
              • Floating Text - Create floating text that reads ((ColorString[2] + (String(Current_Points))) + )) above (Casting unit) with Z offset 0.00, using font size 8.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
              • Floating Text - Change the fading age of (Last created floating text) to 0.00 seconds
              • Floating Text - Set the velocity of (Last created floating text) to 64.00 towards 90.00 degrees
            • Else - Actions
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • Current_Points Greater than or equal to 1
                  • Current_Unit_With_Points Not equal to (Target unit of ability being cast)
                • Then - Actions
                  • Set Current_Points = 0
                • Else - Actions
                  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    • If - Conditions
                      • Current_Points Equal to 5
                      • Current_Unit_With_Points Equal to (Target unit of ability being cast)
                    • Then - Actions
                      • Set ColorString[3] = (|c00ff8000Combo Points:|r +
                      • Floating Text - Create floating text that reads ((ColorString[3] + (String(Current_Points))) + )) above (Casting 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
                      • Floating Text - Change the fading age of (Last created floating text) to 0.00 seconds
                      • Floating Text - Set the velocity of (Last created floating text) to 64.00 towards 90.00 degrees
                    • Else - Actions
                      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                        • If - Conditions
                          • Current_Points Equal to 4
                        • Then - Actions
                          • Set ColorString[4] = (|c00ff0000Combo Points:|r +
                          • Set Current_Points = (Current_Points + 1)
                          • Floating Text - Create floating text that reads ((ColorString[4] + (String(Current_Points))) + )) above (Casting 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
                          • Floating Text - Change the fading age of (Last created floating text) to 0.00 seconds
                          • Floating Text - Set the velocity of (Last created floating text) to 64.00 towards 90.00 degrees
                        • Else - Actions


But combo 3 and 4 are not showed (their colours are not showned).
 
try this:

Trigger:
  • Add Points
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to Silenced Strike
    • Actions
      • Set ComboUnit = (Casting unit)
      • Set ComboUnit2 = (Target unit of ability being cast)
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • Current_Unit_With_Points Equal to ComboUnit2
        • Then - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • Current_Points Greater than or Equal to 4
            • Then - Actions
              • Set Current_Points = 5
              • Set ColorString = (|c00FF0303Combo Points:|r + 5)
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • Current_Points Equal to 3
            • Then - Actions
              • Set Current_Points = 4
              • Set ColorString = (|c00D19801Combo Points:|r + 4)
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • Current_Points Equal to 2
            • Then - Actions
              • Set Current_Points = 3
              • Set ColorString = (|c00FEBA0ECombo Points:|r + 3)
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • Current_Points Equal to 1
            • Then - Actions
              • Set Current_Points = 2
              • Set ColorString = (|c00FFFC01Combo Points:|r + 2)
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • Current_Points Equal to 0
            • Then - Actions
              • Set Current_Points = 1
              • Set ColorString = (|c0020C000Combo Points:|r + 1)
        • Else - Actions
          • Set Current_Points = 1
          • Set ColorString = (|c0020C000Combo Points:|r + 1)
          • Set Current_Unit_With_Points = ComboUnit2
      • Floating Text - Create floating text that reads (ColorString) above ComboUnit with Z offset 0.00, using font size 8.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
      • Floating Text - Change the fading age of (Last created floating text) to 0.00 seconds
      • Floating Text - Set the velocity of (Last created floating text) to 64.00 towards 90.00 degrees


ColorString is a string variable
 
Trigger:
  • Add Points Copy
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to Silenced Strike
    • Actions
      • Set ComboUnit = (Casting unit)
      • Set ComboUnit2 = (Target unit of ability being cast)
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • Current_Unit_With_Points Equal to ComboUnit2
        • Then - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • Current_Points Greater than or equal to 4
            • Then - Actions
              • Set Current_Points = 5
              • Set ColorCombo = (|c0000ff40Combo Point:|r + 5
            • Else - Actions
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • Current_Points Equal to 3
                • Then - Actions
                  • Set Current_Points = 4
                  • Set ColorCombo = (|c00ff8000Combo Points:|r + 4
                • Else - Actions
                  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    • If - Conditions
                      • Current_Points Equal to 2
                    • Then - Actions
                      • Set Current_Points = 3
                      • Set ColorCombo = (|c00ff8000Combo Points:|r + 3
                    • Else - Actions
                      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                        • If - Conditions
                          • Current_Points Equal to 1
                        • Then - Actions
                          • Set Current_Points = 2
                          • Set ColorCombo = (|c00ffff00Combo Points:|r + 2
                        • Else - Actions
                          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                            • If - Conditions
                              • Current_Points Equal to 0
                            • Then - Actions
                              • Set Current_Points = 1
                              • Set ColorCombo = (|c0000ff40Combo Point:|r + 1
                            • Else - Actions
                              • Set Current_Points = 1
                              • Set ColorCombo = (|c0000ff40Combo Point:|r + 1
                              • Set Current_Unit_With_Points = ComboUnit2
                              • Floating Text - Create floating text that reads ColorCombo above ComboUnit 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
                              • Floating Text - Change the fading age of (Last created floating text) to 0.00 seconds
                              • Floating Text - Set the velocity of (Last created floating text) to 64.00 towards 90.00 degrees
        • Else - Actions
 
General chit-chat
Help Users
  • No one is chatting at the moment.
  • The Helper The Helper:
    News portal has been retired. Main page of site goes to Headline News forum now
  • The Helper The Helper:
    I am working on getting access to the old news portal under a different URL for those that would rather use that for news before we get a different news view.
  • Ghan Ghan:
    Easily done
    +1
  • The Helper The Helper:
    https://www.thehelper.net/pages/news/ is a link to the old news portal - i will integrate it into the interface somewhere when i figure it out
  • Ghan Ghan:
    Need to try something
  • Ghan Ghan:
    Hopefully this won't cause problems.
  • Ghan Ghan:
    Hmm
  • Ghan Ghan:
    I have converted the Headline News forum to an Article type forum. It will now show the top 20 threads with more detail of each thread.
  • Ghan Ghan:
    See how we like that.
  • The Helper The Helper:
    I do not see a way to go past the 1st page of posts on the forum though
  • The Helper The Helper:
    It is OK though for the main page to open up on the forum in the view it was before. As long as the portal has its own URL so it can be viewed that way I do want to try it as a regular forum view for a while
  • Ghan Ghan:
    Yeah I'm not sure what the deal is with the pagination.
  • Ghan Ghan:
    It SHOULD be there so I think it might just be an artifact of having an older style.
  • Ghan Ghan:
    I switched it to a "Standard" article forum. This will show the thread list like normal, but the threads themselves will have the first post set up above the rest of the "comments"
  • The Helper The Helper:
    I don't really get that article forum but I think it is because I have never really seen it used on a multi post thread
  • Ghan Ghan:
    RpNation makes more use of it right now as an example: https://www.rpnation.com/news/
  • The Helper The Helper:
  • The Helper The Helper:
    What do you think Tom?
  • tom_mai78101 tom_mai78101:
    I will have to get used to this.
  • tom_mai78101 tom_mai78101:
    The latest news feed looks good
  • The Helper The Helper:
    I would like to see it again like Ghan had it the first time with pagination though - without the pagination that view will not work but with pagination it just might...
  • The Helper The Helper:
    This drink recipe I have had more than a few times back in the day! Mind Eraser https://www.thehelper.net/threads/cocktail-mind-eraser.194720/

      The Helper Discord

      Members online

      No members online now.

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top