floating text with damage dealt

Discussion in 'World Editor Help' started by jarekpl12, Nov 20, 2009.

  1. jarekpl12

    jarekpl12 Active Member

    Ratings:
    +6 / 0 / -0
    i want to make trigger which shows (to own player) how much damage he dealted everytime he gives any... but dont know how to make like that...
     
    • Like Like x 1
  2. Laiev

    Laiev Hey Listen!!

    Ratings:
    +187 / 0 / -0
    You will need a Damage Detection System :x
    Trigger:
    • Game - Display to (Owner of (Damage Source) the text: (Damage taken)


    <freehand, sorry>
     
  3. jarekpl12

    jarekpl12 Active Member

    Ratings:
    +6 / 0 / -0
    how to get that :/
     
  4. jarekpl12

    jarekpl12 Active Member

    Ratings:
    +6 / 0 / -0
    k so i make trigger which deals damage equal to 50% of hero's HP and i made floating text later which shows how much i dealted damage... but it shows like that.... hero has 980 HP and it shows like that 490.000... how to make it show only 490 ?
    EDIT: i will make just floating text when dealing damage with spells (all my spells' damage are from trigger equal to some multiple of main attribute of hero so i can make easy floating text to this spells with dealted damage) but i want to appear only for example 490 damage not so exact 490.000
     
  5. Laiev

    Laiev Hey Listen!!

    Ratings:
    +187 / 0 / -0
    Change real to integer, the real make X.00 integer just set X
     
  6. Joccaren

    Joccaren You can change this now in User CP.

    Ratings:
    +54 / 0 / -0
    If you want a simple, easy to use damage detection system that will allow you to get the damage from everything: spells, normal attacks ect, I recommend using Weeps GUI friendly damage detection system. Its in the tutorials and rescources section.
     
  7. avalya

    avalya New Member

    Ratings:
    +36 / 0 / -0
    Yeah use the GDD (Weep's system) for damage detection, it is easy to use and you'll quickly find your way around to make floating combat texts.
     
  8. Raizn

    Raizn New Member

    Ratings:
    +2 / 0 / -0
    Maybe this is a help


    Trigger:
    • Damage Taken
      • Events
        • Unit - A unit enters (Playable map area)
      • Conditions
      • Actions
        • Trigger - Add to Ability Damage Done <gen> the event (Unit - (Triggering unit) Takes damage)


    Trigger:
    • Ability Damage Done
      • Events
      • Conditions
      • Actions
        • Set abilitydamage = (Damage taken)
        • Floating Text - Create floating text that reads (String(abilitydamage, 3, 0)) above (Attacked unit) with Z offset 0.00, using font size 8.00, color (100.00%, 0.00%, 0.00%), and 0.00% transparency
        • Floating Text - Set the velocity of (Last created floating text) to 64.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 1.50 seconds
     
  9. jarekpl12

    jarekpl12 Active Member

    Ratings:
    +6 / 0 / -0
    where i can find ,,(Damage taken)" what kind of variable is it?:confused:
     
  10. Raizn

    Raizn New Member

    Ratings:
    +2 / 0 / -0
    abilitydamage is a "real" var and you can find damage taken here:

    conversion - convert real to integer -> Event Response - Damage Taken

    good luck
    Raizn
     
  11. jarekpl12

    jarekpl12 Active Member

    Ratings:
    +6 / 0 / -0
    a little confused... where should i place/change it?
    Trigger:
    • Uncontrolled Slam
      • Events
        • Unit - A unit Starts casting an ability
      • Conditions
        • (Ability being cast) Equal to Uncontrolled Slam
      • Actions
        • Set SlamPoint = (Position of (Triggering unit))
        • Set SlamGroup = (Units within 400.00 of SlamPoint matching (((Owner of (Matching unit)) is an enemy of (Owner of (Triggering unit))) Equal tTrue))
        • Wait 0.35 seconds
        • Unit - Set life of (Triggering unit) to ((Life of (Triggering unit)) - (0.50 x (Maximum Life of (Triggering unit))))
        • Unit Group - Pick every unit in SlamGroup and do (Actions)
          • Loop - Actions
            • Unit - Cause (Triggering unit) to damage (Picked unit), dealing (0.50 x (Maximum Life of (Triggering unit))) damage of attack type Hero and damage type Normal
            • Text - Create floating text that reads (String(((Maximum Life of (Triggering unit)) x 0.50))) above (Picked unit) with Z offset 0.00, using font size 8.00, color (100.00%, 0.00%, 0.00%), and 0.00% transparency
            • Text - Set the velocity of (Last created floating text) to 64.00 towards 90.00 degrees
            • Text - Change (Last created floating text): Exclude permanence
            • Text - Change the lifespan of (Last created floating text) to 2.00 seconds
        • Custom script: call RemoveLocation (udg_SlamPoint)
        • Custom script: call DestroyGroup (udg_SlamGroup)
     
  12. jarekpl12

    jarekpl12 Active Member

    Ratings:
    +6 / 0 / -0
    lol it works... but only when enemies deal damage to my hero (its rpg map)
     
  13. Raizn

    Raizn New Member

    Ratings:
    +2 / 0 / -0
    ye. just play around with some conditions to make it only displays hero damage.

    that for example will only display heroes damage over attacked units head

    Trigger:
    • Damage Taken
      • Events
        • Unit - A unit enters (Playable map area)
      • Conditions
        • ((Entering unit) is A Hero) Equal to False
      • Actions
        • Trigger - Add to Ability Damage Done <gen> the event (Unit - (Triggering unit) Takes damage)



    you can modify pretty much of this to optimize it to your rpg hud system.

    bye raizn
     
  14. jarekpl12

    jarekpl12 Active Member

    Ratings:
    +6 / 0 / -0
    what u mean?

    ah btw damage taken are like 12.0 14.0 how to make it 12 14 ?
     
  15. Moridin

    Moridin Snow Leopard

    Ratings:
    +144 / 0 / -0
    Convert it from real to integer.
     
  16. Raizn

    Raizn New Member

    Ratings:
    +2 / 0 / -0
    Sorry jarekpl12. i just edited my post while u replied it^^ i posted an example for displaying only hero damage.
     
  17. jarekpl12

    jarekpl12 Active Member

    Ratings:
    +6 / 0 / -0
    got it but in integer i have no functions like Unit - Property Life just Atributes
     
  18. Raizn

    Raizn New Member

    Ratings:
    +2 / 0 / -0
    Damage taken will be displayed with 123.456. you can change that with the numbers i marked in red and blue below. Blue is 123 and red is 456.

    an example.
    3, 2 will display 123.45
    3, 1 will display 123.4

    hope that will help^^

    (String(abilitydamage, 3, 0))
    that part is btw: conversion - convert real to formatted string
     
  19. jarekpl12

    jarekpl12 Active Member

    Ratings:
    +6 / 0 / -0
    ok my next question is how to make floating text with dmg to appear only for owner player
     
  20. jarekpl12

    jarekpl12 Active Member

    Ratings:
    +6 / 0 / -0
    ok but it doesn't work...

    Trigger:
    • Tekst - Create floating text that reads (String((0.50 x (Maksimum Life of (Triggering unit))), 7, 0)) above (Picked unit) with Z offset 0.00, using font size 10.00, color (100.00%, 0.00%, 0.00%), and 0.00% transparency


    damage are still like 490.0 (hero has 980 HP)
     

Share This Page