• 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.

Floating texts

Status
Not open for further replies.
Level 13
Joined
Jun 3, 2011
Messages
1,058
Hi guys i want to ask you about a system that shows the delt damage of your hero and gold and xp? is there a system? :eekani:
 
Level 10
Joined
Dec 15, 2012
Messages
650
Don't know your problem was solved or not >.<
  • Unit Die
    • Events
      • Unit - A unit Dies
    • Conditions
    • Actions
      • Set TempPoint = (Position of (Triggering unit))
      • -------- Hero Xp --------
      • Floating Text - Create floating text that reads (String((Hero experience of (Triggering unit)))) at (TempPoint offset by (-100.00, 0.00)) with Z offset 125.00, using font size 10.00, color (100.00%, 100.00%, 100.00%), and 0.00% transparency
      • Floating Text - Set the velocity of (Last created floating text) to 60.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 1.70 seconds
      • -------- Gold --------
      • Floating Text - Create floating text that reads (String(((Owner of (Triggering unit)) Current gold))) at (TempPoint offset by (100.00, 0.00)) with Z offset 125.00, using font size 10.00, color (100.00%, 100.00%, 100.00%), and 0.00% transparency
      • Floating Text - Set the velocity of (Last created floating text) to 60.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 1.70 seconds
      • Custom script: call RemoveLocation(udg_TempPoint)
 
Level 10
Joined
Dec 15, 2012
Messages
650
So this won't leaks ?
(actually all done by UndeadImmortal xp)
[trigger=Leaks Removed]test
Events
Unit - A unit Dies
Conditions
Actions
Set TempPoint1 = ((Position of (Triggering unit)) offset by (100.00, 0.00))
Set TempPoint2 = ((Position of (Triggering unit)) offset by (-100.00, 0.00))
-------- hero xp --------
Floating Text - Create floating text that reads (String((Hero experience of (Triggering unit)))) at TempPoint1 with Z offset 25.00, using font size 10.00, color (100.00%, 100.00%, 100.00%), and 0.00% transparency
Floating Text - Set the velocity of (Last created floating text) to 60.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 1.70 seconds
-------- gold --------
Floating Text - Create floating text that reads (String(((Triggering player) Current gold))) at TempPoint2 with Z offset 25.00, using font size 10.00, color (100.00%, 100.00%, 100.00%), and 0.00% transparency
Floating Text - Set the velocity of (Last created floating text) to 60.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 1.70 seconds
-------- Remove Leaks --------
Custom script: call RemoveLocation(udg_TempPoint1)
Custom script: call RemoveLocation(udg_TempPoint2)[/trigger]
I've learnt a lesson today :ogre_hurrhurr:
 
Level 13
Joined
Jun 3, 2011
Messages
1,058
For Symphony, we use Gold Coins, so maybe stick to Unit Acquires an Item. Anyways, for the hero exp, it should display the exp gotten from the kill, not the full exp of the hero.

Yes but im trying to make a system that when a monster dies the near players near the dying will receive gold
 
  • Gold
    • Events
      • Unit - A unit Dies
    • Conditions
      • (Owner of (Dying unit)) Equal to Player 11 (Dark Green)
    • Actions
      • Set TempPoint = (Position of (Triggering unit))
      • Custom script: set bj_wantDestroyGroup = true
      • Unit Group - Pick every unit in (Units within 800.00 of TempPoint matching ((((Matching unit) is alive) Equal to True) and ((((Matching unit) belongs to an ally of Player 1 (Red)) Equal to True) and (((Matching unit) is A Hero) Equal to True)))) and do (Actions)
        • Loop - Actions
          • Player Group - Add (Picked player) to TempPGroup
      • Player Group - Pick every player in TempPGroup and do (Actions)
        • Loop - Actions
          • Player - Add 1000 to (Picked player) Current gold
      • Custom script: call RemoveLocation(udg_TempPoint)
      • Custom script: set udg_TempPoint = null
 
Level 20
Joined
Jun 27, 2011
Messages
1,864
  • Gold
    • Events
      • Unit - A unit Dies
    • Conditions
      • (Owner of (Dying unit)) Equal to Player 11 (Dark Green)
    • Actions
      • Set TempPoint = (Position of (Dying unit))
      • Custom script: set bj_wantDestroyGroup = true
      • Unit Group - Pick every unit in (Units within 800.00 of TempPoint matching ((((Matching unit) is alive) Equal to True) and ((((Matching unit) belongs to an ally of Player 1 (Red)) Equal to True) and (((Matching unit) is A Hero) Equal to True)))) and do (Actions)
        • Loop - Actions
          • Player Group - Add (Picked player) to TempPGroup
      • Player Group - Pick every player in TempPGroup and do (Actions)
        • Loop - Actions
          • Player - Add 1000 to (Picked player) Current gold
      • Custom script: call RemoveLocation(udg_TempPoint)
      • Custom script: set udg_TempPoint = null
You are picking a player which isn't in a player group.
Also, Dying unit -> Triggering unit.
 
Level 28
Joined
Sep 26, 2009
Messages
2,520
No.
You need to set
TempPoint1 = position of (triggering unit)
TempPoint2 = TempPoint1 offset by (100.00, 0.00)

Dying unit is the same as triggering unit, I don't think it makes difference here (it would make difference if you used waits in your trigger and after waits you wanted to call the dying unit. For that you would need triggering unit, because dying unit could be different unit by that time, while triggering unit stays the same for that trigger)
 
Status
Not open for further replies.
Top