How to?

Winterherz

New Member
Reaction score
39
How do you create a floating text above the target of unit of ability being cast that reads the amount of healed done by the caster?
 

Dirac

22710180
Reaction score
147
The whole healing effect must be triggered, using holy light wont work.

Set the life of unit to (life of unit + 100)
Create floating text displaying 100 over unit
 

Winterherz

New Member
Reaction score
39
The whole healing effect must be triggered, using holy light wont work.

Set the life of unit to (life of unit + 100)
Create floating text displaying 100 over unit

i already know that idea, what i mean is about for a complex trigger formula....to show this on floating text:::: life of unit + (random # 100 and 200) + (0.22 x int of casting unit) = ### on floating text above target unit
 

Chaos_Knight

New Member
Reaction score
39
I know, this trigger was -BeRzErKeR-'s idea, adn trigger but i used it in my map :) Btw, it a spell ;)

Trigger:
  • Taste of Death
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to Taste of Death
    • Actions
      • -------- Setting the casting unit --------
      • Set ToD_Caster = (Triggering unit)
      • -------- - --------
      • -------- Getting the owner of triggering unit --------
      • Set ToD_Owner = (Owner of ToD_Caster)
      • -------- - --------
      • -------- Setting the position --------
      • Set ToD_Position = (Position of ToD_Caster)
      • -------- - --------
      • -------- Base healing value --------
      • Set ToD_Base_Heal = 15.00
      • -------- - --------
      • -------- Getting the level of ability --------
      • Set ToD_Ability = (Level of (Ability being cast) for ToD_Caster)
      • -------- - --------
      • -------- Base chance value --------
      • Set ToD_Base_Chance = 25
      • -------- - --------
      • -------- Area of Effect Value --------
      • Set ToD_Area_of_Effect = (350.00 x (Real((Level of Taste of Death for ToD_Caster))))
      • -------- Getting the dummy abilities --------
      • -------- - --------
      • Set ToD_Dummy_Ability = Taste of Death(dummy)
      • Set ToD_Dummy_Ability_Frenzy = Unholy Frenzy(dummy)
      • -------- - --------
      • For each (Integer A) from 1 to 36, do (Actions)
        • Loop - Actions
          • -------- - --------
          • -------- Setting the position --------
          • Set ToD_Target_Location = (ToD_Position offset by 50.00 towards (10.00 x (Real((Integer A)))) degrees)
          • -------- - --------
          • -------- Creating dummy --------
          • -------- Adding ability --------
          • -------- Ordering dummy to cast a spell --------
          • Unit - Create 1 Dummy(ToD) for ToD_Owner at ToD_Position facing Default building facing degrees
          • Unit - Add a 1.50 second Generic expiration timer to (Last created unit)
          • Unit - Add ToD_Dummy_Ability to (Last created unit)
          • Unit - Order (Last created unit) to Undead Dreadlord - Carrion Swarm ToD_Target_Location
          • -------- - --------
          • -------- Clearing leaks --------
          • Custom script: call RemoveLocation(udg_ToD_Target_Location)
          • -------- - --------
      • -------- - --------
      • -------- Setting the unit group --------
      • Set ToD_Heal_Group = (Units within ToD_Area_of_Effect of ToD_Position matching ((((Owner of (Matching unit)) is an enemy of ToD_Owner) Equal to True) and (((Matching unit) is alive) Equal to True)))
      • -------- - --------
      • -------- Picking units and doing actions in Unit Group --------
      • Unit Group - Pick every unit in ToD_Heal_Group and do (Actions)
        • Loop - Actions
          • -------- - --------
          • -------- Counting the units in Unit Group --------
          • Set ToD_Unit_Counter = (Number of units in ToD_Heal_Group)
          • -------- - --------
          • -------- Condition checks if the number of units in Unit Group is larger than 0 --------
          • -------- - --------
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • ToD_Unit_Counter Greater than 0
        • Then - Actions
          • -------- - --------
          • -------- Setting the life of the caster to (number of units in unit group * 15 * level of ability) --------
          • Unit - Set life of ToD_Caster to ((Life of ToD_Caster) + ((ToD_Base_Heal x (Real(ToD_Ability))) x (Real(ToD_Unit_Counter))))
          • -------- - --------
          • -------- Creating and destroying Special effects --------
          • Special Effect - Create a special effect attached to the origin of ToD_Caster using Abilities\Spells\Undead\AnimateDead\AnimateDeadTarget.mdl
          • Special Effect - Destroy (Last created special effect)
          • -------- - --------
          • -------- Creating the Floating text --------
          • -------- Setting the floating text --------
          • Floating Text - Create floating text that reads (+ + (String(((Integer(ToD_Base_Heal)) x (ToD_Ability x ToD_Unit_Counter))))) above ToD_Caster with Z offset 0.00, using font size 10.00, color (0.00%, 50.00%, 10.00%), and 0.00% transparency
          • Floating Text - Change (Last created floating text): Disable permanence
          • Floating Text - Set the velocity of (Last created floating text) to 64.00 towards 90.00 degrees
          • Floating Text - Change the fading age of (Last created floating text) to 3.00 seconds
          • Floating Text - Change the lifespan of (Last created floating text) to 5.00 seconds
          • -------- - --------
        • Else - Actions
      • -------- - --------
      • -------- Clearing the value, of units in unit group --------
      • Set ToD_Unit_Counter = 0
      • -------- - --------
      • -------- Clearing leaks --------
      • Custom script: call DestroyGroup(udg_ToD_Heal_Group)
      • -------- - --------
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Random integer number between 1 and 100) Less than or equal to (ToD_Base_Chance x ToD_Ability)
        • Then - Actions
          • -------- - --------
          • -------- Creating dummy --------
          • -------- Adding ability --------
          • -------- Setting the level of dummy spell --------
          • -------- Ordering dummy to cast a spell --------
          • Unit - Create 1 Dummy(ToD) for ToD_Owner at ToD_Position facing Default building facing degrees
          • Unit - Add a 1.50 second Generic expiration timer to (Last created unit)
          • Unit - Add ToD_Dummy_Ability_Frenzy to (Last created unit)
          • Unit - Set level of ToD_Dummy_Ability_Frenzy for (Last created unit) to ToD_Ability
          • Unit - Order (Last created unit) to Undead Necromancer - Unholy Frenzy ToD_Caster
        • Else - Actions
      • -------- - --------
      • -------- Clearing leaks --------
      • Custom script: call RemoveLocation(udg_ToD_Position)
 

Komaqtion

You can change this now in User CP.
Reaction score
469
You need to convert it to an Integer, like this:
Trigger:
  • Floating Text - Create floating text that reads (+ + (String((ToD_Base_Heal x (Integer((ToD_Ability x ToD_Unit_Counter))))))) above ToD_Caster with Z offset 0.00, using font size 10.00, color (0.00%, 50.00%, 10.00%), and 0.00% transparency


So you convert the whole thing to an integer, not just "ToD_Base_Heal" ;)

(This is freehanded, but it's the basic concept :D)
 

Chaos_Knight

New Member
Reaction score
39
You need to convert it to an Integer, like this:
Trigger:
  • Floating Text - Create floating text that reads (+ + (String((ToD_Base_Heal x (Integer((ToD_Ability x ToD_Unit_Counter))))))) above ToD_Caster with Z offset 0.00, using font size 10.00, color (0.00%, 50.00%, 10.00%), and 0.00% transparency


So you convert the whole thing to an integer, not just "ToD_Base_Heal" ;)

(This is freehanded, but it's the basic concept :D)

Freehanded, right...
 

Komaqtion

You can change this now in User CP.
Reaction score
469
It was !, but I copied the actual text, and then just changed stuff :p
But the changed stuff is freehanded ;)
 

Mezion

New Member
Reaction score
0
I know, this trigger was -BeRzErKeR-'s idea, adn trigger but i used it in my map :) Btw, it a spell ;)

Trigger:
  • Taste of Death
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to Taste of Death
    • Actions
    • ( ETC. )

wow that's so hot will all the comments!!! :thup:
 

Winterherz

New Member
Reaction score
39
i found a small glitch to the floating text thing, it seems if i try to cast a single-target heal-over-time spell(20 seconds) on multiple units, the floating text only appears on the first target(no floating text on succeeding targets), and i have to wait for the duration to complete and cast the spell again on another unit to make the floating text appear again.

do i need to adjust something?

my variable targeted unit is[ target unit of ability being cast], which i think only works on 1 unit and floating text glitching

please help
 

Winterherz

New Member
Reaction score
39
post your code?

Here's my code:
Trigger:
  • Events
    • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to Lifebloom
    • Actions
      • Set LifebloomTarget_CastingUnit = (Casting unit)
      • Set LifebloomUnitTarget = (Target unit of ability being cast)
      • Trigger - Turn on Lifebloom Init OFF <gen>



Lifebloom Init OFF

Trigger:
  • Events
    • Time - Every 2.00 seconds of game time
    • Conditions
      • (LifebloomUnitTarget has buff Lifebloom Lv2 ) Equal to True
    • Actions
      • Special Effect - Create a special effect attached to the overhead of LifebloomUnitTarget using Abilities\Spells\Human\Heal\HealTarget.mdl
      • Set Lifebloom_BaseSpell = (Random real number between 202.00 and 311.00)
      • Set Lifebloom_RandomNUM_Stat = (Random real number between 0.50 and 1.20)
      • Set Lifebloom_Stat = (Real((Intelligence of LifebloomTarget_CastingUnit (Include bonuses))))
      • Unit - Set life of LifebloomUnitTarget to ((Life of LifebloomUnitTarget) + (Lifebloom_BaseSpell + (Lifebloom_RandomNUM_Stat x Lifebloom_Stat)))
      • Floating Text - Create floating text that reads (+ + ((String((Integer((Lifebloom_BaseSpell + (Lifebloom_RandomNUM_Stat x Lifebloom_Stat)))))) + (Lifebloom))) above LifebloomUnitTarget with Z offset 0.00, using font size 9.50, color (100.00%, 100.00%, 0.00%), and 0.00% transparency
      • Floating Text - Set the velocity of (Last created floating text) to 10.00 towards 90.00 degrees
      • 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 0.50 seconds
 
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