• 🏆 Texturing Contest #33 is OPEN! Contestants must re-texture a SD unit model found in-game (Warcraft 3 Classic), recreating the unit into a peaceful NPC version. 🔗Click here to enter!
  • It's time for the first HD Modeling Contest of 2024. Join the theme discussion for Hive's HD Modeling Contest #6! Click here to post your idea!

[Trigger] Custom damage floating text

Status
Not open for further replies.
Level 2
Joined
Dec 12, 2017
Messages
26
Hello everyone, second post on this wonderful page, this is the doubt:

I am working on a RPG map for 1 player where he controls 4 heroes, a warrior, an archer, a rogue and a priest.

I installed on the map the GUI-Friendly Damage Detection v1.2.1 (Custom damage floating text made by Weep), and then Floating Text - Damage&Spells v2 (Floating Text - Damage & Spells v2 made by Juliano), with that I could show with red floating text the damage that heroes do to creeps, and with a green floating text the damage that the creeps do to heroes, they also show floating text with the skills they use.

  • What I want is to differentiate with colors the origin of the damage, that is, if the damage done by the heroes to the creeps is physical, show red floating text with the amount of damage done, if the damage was done by a spell then shows the floating text with another color, if it was a critical hit the floating text appears a bit larger in yellow and with a "!" in the end, if the attack was evaded, shows a "dodged", that's the idea.
Please keep in mind that I do not know anything about Jass, vJass or hashtables, I understand a bit how the Weep GDD works because it was the easiest to understand for me, I perform well with the old and reliable GUI.
From now, greetings and thanks for your attention and I hope you can help me

Here's the triggers i use for showing floating text:

  • Configuration
    • Acontecimientos
      • Map initialization
    • Condiciones
    • Acciones
      • Set tempGroup = (Units in (Playable map area))
      • Grupo de unidad - Pick every unit in tempGroup and do (Detonador - Add to Floating Spell Name <gen> the event (Unidad - (Picked unit) Inicia el efecto de una habilidad))
      • Custom script: call DestroyGroup(udg_tempGroup)
      • -------- Configure the duration and size of the floating texts --------
      • Set Text_Duration = 1.75
      • Set TextSize_dmg = 9.00
      • Set TextSize_spells = 11.00
      • -------- - --------
      • -------- These are strings to make the floating texts use the matching players colors --------
      • -------- Neutral Hostile will be using white --------
      • Set PlayerColors[1] = |c00FF0303
      • Set PlayerColors[2] = |c000042FF
      • Set PlayerColors[3] = |c001CE6B9
      • Set PlayerColors[4] = |c00540081
      • Set PlayerColors[5] = |c00FFFC01
      • Set PlayerColors[6] = |c00fEBA0E
      • Set PlayerColors[7] = |c0020C000
      • Set PlayerColors[8] = |c00E55BB0
      • Set PlayerColors[9] = |c00959697
      • Set PlayerColors[10] = |c007EBFF1
      • Set PlayerColors[11] = |c00106246
      • Set PlayerColors[12] = |c004E2A04
      • Set PlayerColors[13] = |c0020C000
      • Set PlayerColors[14] = |c0020C000
      • Set PlayerColors[15] = |c0020C000
      • Set PlayerColors[16] = |c0020C000
      • Set PlayerColors[17] = |c0020C000
      • Set PlayerColors[18] = |c0020C000
      • Set PlayerColors[19] = |c0020C000
      • Set PlayerColors[20] = |c0020C000
      • Set PlayerColors[21] = |c0020C000
      • Set PlayerColors[22] = |c0020C000
      • Set PlayerColors[23] = |c0020C000
      • Set PlayerColors[24] = |c0020C000
      • Set PlayerColors[25] = |c0020C000
      • Set PlayerColors[26] = |c0020C000
      • Set PlayerColors[27] = |c0020C000
      • Set PlayerColors[28] = |c0020C000
  • Configuration2
    • Acontecimientos
      • Unidad - A unit enters (Playable map area)
    • Condiciones
    • Acciones
      • Detonador - Add to Floating Spell Name <gen> the event (Unidad - (Triggering unit) Inicia el efecto de una habilidad)
  • Floating Spell Name
    • Acontecimientos
    • Condiciones
      • (Unit-type of (Triggering unit)) No igual a Campesino
    • Acciones
      • Texto flotante - Create floating text that reads (PlayerColors[(Player number of (Owner of (Triggering unit)))] + (Name of (Ability being cast))) above (Triggering unit) with Z offset 0.00, using font size TextSize_spells, color (100.00%, 100.00%, 100.00%), and 0.00% transparency
      • Texto flotante - Set the velocity of (Last created floating text) to 100.00 towards 90.00 degrees
      • Texto flotante - Change (Last created floating text): Desactivar permanence
      • Texto flotante - Change the lifespan of (Last created floating text) to Text_Duration seconds
      • Texto flotante - Change the fading age of (Last created floating text) to 0.65 seconds
  • Floating Damage Taken
    • Acontecimientos
      • Partida - GDD_Event becomes Igual a 0.00
    • Condiciones
      • GDD_Damage Mayor que 1.00
    • Acciones
      • Texto flotante - Create floating text that reads (PlayerColors[(Player number of (Owner of GDD_DamageSource))] + (String((Integer(GDD_Damage))))) above GDD_DamagedUnit with Z offset 0.00, using font size TextSize_dmg, color (100.00%, 100.00%, 100.00%), and 0.00% transparency
      • Texto flotante - Set the velocity of (Last created floating text) to 100.00 towards 90.00 degrees
      • Texto flotante - Change (Last created floating text): Desactivar permanence
      • Texto flotante - Change the lifespan of (Last created floating text) to Text_Duration seconds
      • Texto flotante - Change the fading age of (Last created floating text) to 0.65 seconds
EDIT: I found Damage Engine 3.8.0.0 , it's exactly what I want, it shows damage, mana, healing and critical hits like floating texts of different colors, it says that it has cross-compatibility with Weep's system, if someone can tell me how to implement this to do what I ask above (because as I said I do not understand Jass), or how to do it otherwise, it will be grateful
 
Last edited:
Level 39
Joined
Feb 27, 2007
Messages
4,994
I believe the only thing you forgot was a Floating Text - Show (last created floating text) for (All Players) and what you wrote would have worked. Hard to tell for sure because of your non-english WE but I don't see much else.

As for how to get DamageEngine to work with GDD, if Bribe says its compatible he'll have put some instructions for how to use it in the documentation. I suggest you read through everything in the resource post and look at the triggers in the map to see how to import it and get it to work. If that still confuses you, post again here.
 
Level 2
Joined
Dec 12, 2017
Messages
26
I believe the only thing you forgot was a Floating Text - Show (last created floating text) for (All Players) and what you wrote would have worked. Hard to tell for sure because of your non-english WE but I don't see much else.

The system as described above works well, shows the damage of the skills and attacks but shows them all the same, that is, one can not differentiate if the damage was caused by a basic attack or a skill since it shows both damage with the same font and color, I want the damage of the attacks and skills, as well as the critical hits and the dodges to be shown each one with a specific color.

As for how to get DamageEngine to work with GDD, if Bribe says its compatible he'll have put some instructions for how to use it in the documentation. I suggest you read through everything in the resource post and look at the triggers in the map to see how to import it and get it to work. If that still confuses you, post again here.

I would love to implement that on my map, but I do not do it for fear of ruining it and then can not save or something, you could tell me if that engine engine requires NewGen Pack or something or can be implemented in the standard WE.
And if I could implement it, I would not know what events and conditions use to differentiate if the damage was physical or product of a skill, or if it was critical or not, or if it was dodged, if you can tell me how to do that or another way to differentiate the source of the damage, it would be great. What I could do is create the floating text.
Thanks for your answer

EDIT: I will try to make it work as you say, reading all the content, but if there is an easier way to do it with the Weeb system it would be better
 
Level 9
Joined
Apr 23, 2011
Messages
527
Damage Engine works with vanilla WE and is compatible with GDD given that you follow Bribe's instructions about Compatibility.

To check if the damage type was caused by a spell, check isSpellDamage. If true, then change color of floating text. If false, change accordingly. There is also DamageTypeXXX to further differentiate physical damage.
I don't think you can detect if a hit was critical/dodged unless there is a triggered system for that.
To detect damage source, simply use DamageEventSource for your triggers.
 
Status
Not open for further replies.
Top