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
 

RoarMan

Member
Reaction score
12
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.
 

Crusher

You can change this now in User CP.
Reaction score
121
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?
 

TheTempest

New Member
Reaction score
6
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?
 

RoarMan

Member
Reaction score
12
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.
 

Crusher

You can change this now in User CP.
Reaction score
121
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).
 

Tom_Kazansky

--- wraith it ! ---
Reaction score
157
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
 

Crusher

You can change this now in User CP.
Reaction score
121
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 Discord

      Staff online

      Members online

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top