• 🏆 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!
  • 🏆 Hive's 6th HD Modeling Contest: Mechanical is now open! Design and model a mechanical creature, mechanized animal, a futuristic robotic being, or anything else your imagination can tinker with! 📅 Submissions close on June 30, 2024. Don't miss this opportunity to let your creativity shine! Enter now and show us your mechanical masterpiece! 🔗 Click here to enter!

Damage System

Status
Not open for further replies.
Level 8
Joined
Feb 20, 2020
Messages
200
well i need something more simple, just need to show damage and heal, maybe a casting bar but that's all!
i took a look at this one and it have a LOT of stuff... and that's not what i really need... or at least it will take a lot of time to implement a thing that i dont need everything...
im looking for a simple system, show the damage, show the heal, show a casting bar, done!
 
Level 20
Joined
Aug 13, 2013
Messages
1,696
It will not take a lot of time to implement it, no more object data importing here and there, just the code...
plus it features most of your needs seriously (except for that casting bar thing)

The other way around is to use a seperated resources. a heal event, damage event, casting bars etc...
^ and that would take you a lot of time.
 

Uncle

Warcraft Moderator
Level 65
Joined
Aug 10, 2018
Messages
6,637
Copy and paste the Damage Engine folder into your map and you're all set on the importing part.

After that you'll need to create a trigger to utilize the Damage Engine (every system requires this).

In Bribe's Damage Engine your triggers will use custom Real Events. Here's an example of displaying the damage dealt as a text message to all players, this can easily be reformatted to work for floating text:

  • Events
  • DamageEvent becomes equal to 1.00
  • Actions
  • Display text message to all players: "Real(DamageEventAmount)"
The system provides you with Variables that have the information you need:

DamageEventAmount = How much damage is being dealt
DamageEventSource = The damaging unit
DamageEventTarget = The damaged unit

It also provides you with different types of DamageEvents that allow you to manipulate damage at different stages of the process. The DamageEvent I used above is the one that runs later on in the process, I believe it happens after most calculations (armor for example) have been completed.
 
Level 8
Joined
Feb 20, 2020
Messages
200
guys, what sould i change in this system for custom "attack types", for example
Fire attack (chaos type) deals more damage to nature armor (fortified) but deals less damage to Water armor (Divine)?

or to change the damage to the warcraft modified gameplay constants?

because i already changed all the warcraft gameplay constants to the % i want...
i just need to show the damage, the heal, critical or miss...
nothing more...
 
Last edited:
guys, what sould i change in this system for custom "attack types", for example
Fire attack (chaos type) deals more damage to nature armor (fortified) but deals less damage to Water armor (Divine)?

or to change the damage to the warcraft modified gameplay constants?

because i already changed all the warcraft gameplay constants to the % i want...
i just need to show the damage, the heal, critical or miss...
nothing more...

You show Damage via Damage Engine, Heal via HealEvent, but crit and misses cannot be detected unless you trigger them in a bit of a complicated way from a unit-is-attacked event.
 
i mean, in this damage system that JakeZinc sent me, where i can turn off the "custom damage" and let the warcraft normal damage be done... and show that damage.
If you use a DDS but don't change the damage, that's all that you need.

If you change the damage but want to know the original value (before user modification and WarCraft 3 modification) then use DamageEventPrevAmt
 
Level 8
Joined
Feb 20, 2020
Messages
200
i used GUI-Friendly Damage Detection -- v1.2.1 -- by Weep, but i cant make the flooating text to disapear for multiplayer...
im trying to use something like that... anyone could help me to fix this trigger?



Display Damage
Events
Game - GDD_Event becomes Equal to 0.00
Conditions
Actions
Floating Text - Create floating text that reads (String(GDD_Damage)) above GDD_DamagedUnit with Z offset 0.00, using font size 10.00, color (100.00%, 100.00%, 100.00%), and 0.00% transparency
Set VariableSet TempFloatingText[TextNumber] = (Last created floating text)
Set VariableSet TextNumber = (TextNumber + 1)
Countdown Timer - Start FloatingText_Removal as a One-shot timer that will expire in 0.40 seconds



Text Removal
Events
Time - FloatingText_Removal expires
Conditions
Actions
Floating Text - Destroy TempFloatingText[TextNumber]
Set VariableSet TextNumber = (TextNumber - 1)
 

Uncle

Warcraft Moderator
Level 65
Joined
Aug 10, 2018
Messages
6,637
You're over-complicating it, floating text is simple:
  • Actions
    • Floating Text - Create floating text that reads "TEXT GOES HERE" above (Some Unit) with Z offset 0.00, using font size 20.00, color (100.00%, 100.00%, 100.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 2.00 seconds
    • Floating Text - Change the fading age of (Last created floating text) to 1.00 seconds
If you want to destroy it after a delay then simply "Disable permanence" and change it's "lifespan". I believe you have to disable permanence before setting the lifespan. Velocity and fading age are just extra effects to make it look nice.
 
Last edited:
Level 8
Joined
Feb 20, 2020
Messages
200
COOL!!
now its working just fine!
guys one more thing to be perfect! there is a way to use a condition linked to the type of attack? like :

if Type of attack of attacking unit == Siege
then
change text = red
else
 
humm but what part of damage engine i should import ONLY to get that? i just need to know the type of damage... any idea?
You would need to import the Damage Engine category into your map. If you want to also include support for compatibility with Weep's DDS, I have included that as well.
 
Level 11
Joined
Jul 4, 2016
Messages
627
I don't believe looking_for_help has updated his system in over five years now. So if you want a up date to damage system, you would choose bribe's.
 
Status
Not open for further replies.
Top