Damage Taken

Zetrix91

TH.net Regular
Reaction score
2
Im making a spell called explosive shot, its supposed to keep track on how much damage the caster has done to the target in the next 5 seconds.

Trigger:
  • Explosive Shot Initial Cast
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to Explosive Shot (Explosive Shot)
    • Actions
      • Set ExplosiveShotCaster_U = (Casting unit)
      • Set ExplosiveShotTarget_U = (Target unit of ability being cast)
      • Set ExplosiveShotDamage_Int = 0
      • Countdown Timer - Start ExplosiveShot_Timer as a One-shot timer that will expire in 5.00 seconds
      • Trigger - Add to Explosive Shot Damage <gen> the event (Unit - ExplosiveShotTarget_U Takes damage)
      • Trigger - Turn on Explosive Shot Damage <gen>

Trigger:
  • Explosive Shot Damage
    • Events
    • Conditions
      • (Damage source) Equal to ExplosiveShotCaster_U
    • Actions
      • Set ExplosiveShotDamage_Int = (ExplosiveShotDamage_Int + (Integer((Damage taken))))

Trigger:
  • Explosive Shot Turnoff
    • Events
      • Time - ExplosiveShot_Timer expires
    • Conditions
    • Actions
      • Trigger - Turn off Explosive Shot Damage <gen>
      • Floating Text - Create floating text that reads (String(ExplosiveShotDamage_Int)) above ExplosiveShotCaster_U with Z offset 0.00, using font size 10.00, color (100.00%, 100.00%, 100.00%), and 0.00% transparency


The problem is that it wont show the correct damage at all, and if i cast it on a unit that has been hit by it before, it will count the old damage as well.
 

BlueMirage

Trust, but doubt.
Reaction score
39
Weep's GUI-Friendly Damage Detection system.
DuelPlayer beat me to it.

Why would you not want the system? It's very good and especially easy to use.
 

Zetrix91

TH.net Regular
Reaction score
2
Weep's GUI-Friendly Damage Detection system.
DuelPlayer beat me to it.

Why would you not want the system? It's very good and especially easy to use.

Because i rather not use a system i dont fully understand, and i wanna keep it as simple as possible, which means no system i gotta learn and keep in mind when i make heroes.
 

mapguy

New Member
Reaction score
46
When a unit enters playable map area you add an event to a trigger:
(triggering unit takes damage)
then when damage is dealt you detect the source and manage the triggers to work based on:
Damaged unit has buff?
is it equal to Target_unit_ability_stomp ?
damage source equal to hero_093?

But you will have to recycle your unit or you get an event leak on your map...
 

Ayanami

칼리
Reaction score
288
Event leaks are a problem. GDD solves this problem. You say that you rather not use a system that you fully understand. But do you actually understand what you're doing in the first place? Try convert your GUI into JASS. See if you understand what's going on. Basically, you don't understand the programming language itself but you're programming with alternate method known as GUI. In my opinion, GUI is just plain inefficient.
 

mapguy

New Member
Reaction score
46
Event leaks are a problem. GDD solves this problem. You say that you rather not use a system that you fully understand. But do you actually understand what you're doing in the first place? Try convert your GUI into JASS. See if you understand what's going on. Basically, you don't understand the programming language itself but you're programming with alternate method known as GUI. In my opinion, GUI is just plain inefficient.

Some mounths ago you were all into GUI...:nuts:
Now you are all into JASS...

well, I like JAZZ.
 

Ayanami

칼리
Reaction score
288
Some mounths ago you were all into GUI...:nuts:
Now you are all into JASS...

well, I like JAZZ.

It's probably because I found out how inefficient GUI is. If you pick up v/JASS, you'll realize how inefficient it is.
 

Accname

2D-Graphics enthusiast
Reaction score
1,462
GUI doesnt need to be efficient for a game which is more then 7 years old.
what do you expect? it serves the only purpose of being (rather) easy and fast to learn and use.
 

Moridin

Snow Leopard
Reaction score
144
Guys don't turn this into a GUI vs JASS debate. There are plenty of those already.

Your best bet would be to use GDD (in terms of efficiency and leaks). However, if you feel the need to understand everything you're doing, you can trigger it yourself.
 

mapguy

New Member
Reaction score
46
My AOS has a GUI made damage detections and unit recycle system.
This is not awesome, but fits it's purposes.
PM me and I send you the triggers.
 

Accname

2D-Graphics enthusiast
Reaction score
1,462
My AOS has a GUI made damage detections and unit recycle system.
This is not awesome, but fits it's purposes.
PM me and I send you the triggers.

i strictly recommend anybody in here to not PM him to get those systems.
mapguy, seriously, stop advicing people to use inefficient resources. if you believe this hard in your own work upload it at the turorial and resources sub forum for an open discussion, if you dont then stop giving bad advice to newbies.
 

mapguy

New Member
Reaction score
46
i strictly recommend anybody in here to not PM him to get those systems.
mapguy, seriously, stop advicing people to use inefficient resources. if you believe this hard in your own work upload it at the turorial and resources sub forum for an open discussion, if you dont then stop giving bad advice to newbies.

I told him my system is a shit, but this GUI.
he chooses what is the best for him.
I know the best is to use GDD or WEPP...I just offered a GUI made system.

He can use whatever he wants. I just offered mine cause it's GUI and the guy said he wants a system he can undertand.
 

Ayanami

칼리
Reaction score
288
I told him my system is a shit, but this GUI.
he chooses what is the best for him.
I know the best is to use GDD or WEPP...I just offered a GUI made system.

He can use whatever he wants. I just offered mine cause it's GUI and the guy said he wants a system he can undertand.

Even if it's a GUI System, if it's inefficient, there's no point. Which itself contradicts itself as there really can't be an efficient GUI based system. But again, you could post it up in Tutorials and Resources section to discuss about the efficiency.
 
General chit-chat
Help Users
  • No one is chatting at the moment.

      The Helper Discord

      Staff online

      Members online

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top