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

About displaying damage

Status
Not open for further replies.
Level 7
Joined
Apr 12, 2009
Messages
188
Hey again.I saw in many RPGs that when the character hits,a text with the damage he/she's done appears near him/her.How do i do that? Also,i don't want to make an ability with crit because it looks ugly ,and if that's so,how do i make it look cool?Also i want to do this for spells too.Thanks!

Be warned, doing it exactly as shown in the example map by defskull is not the best way to 'detect' the damage event, since every time any unit on your map takes damage, it has to add an event to the damage text trigger (effectively causing event buildup and leakage). I remember I had some issues with doing it that way in my map some time back, and eventually converted to a really simple, GUI friendly damage detection system. I would highly recommend it if you're looking for a stable system - it also allows you to use damage detection very easily in other systems and spells!

This is the system (all it takes is copy paste of a few triggers):
Weep's Amazing Damage Detection

Then you can use a trigger like this!
  • Create Text
  • Events
  • Game - GDD_Event becomes Equal to 0.00
  • Conditions
  • GDD_Damage Greater than 1.00
  • Actions
  • Floating Text - Create floating text that reads (String((Integer(GDD_Damage)))) above GDD_DamagedUnit with Z offset 0.00, using font size 8.00, color (100.00%, 14.00%, 14.00%), and 0.00% transparency
  • Floating Text - Hide (Last created floating text) for (All players matching ((Owner of GDD_DamageSource) Not equal to (Matching player)))
  • Floating Text - Change (Last created floating text): Disable permanence
  • Floating Text - Set the velocity of (Last created floating text) to (Random real number between 50.00 and 100.00) towards (Random real number between 70.00 and 110.00) degrees
  • 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.00 seconds
If you want to see this method in action, take a look at my game Defend the Basement, and if you need further advice or help let me know :D
 
Status
Not open for further replies.
Top