• 🏆 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!

GUI Attack Detection 1.0

This bundle is marked as useful / simple. Simplicity is bliss, low effort and/or may contain minor bugs.
Here's an attack detection I've developed using GUI. It runs without using orb effects and avoids using an indexing system. Its most likely one of the first true GUI attack systems. If you are a jass user, you may find no need for this, as it is written in GUI for those who cannot use jass.

Here's some things that my system uses that others dont
- No orbs, letting you keep your orb effects
- All in simple triggers
- Fully MUI
- Uses of Groups and Hashtables
- Detection of attacks
- Easy configuration

Keywords:
attack, detection, gui, mui
Contents

Attack Detection 1.0 (Map)

Reviews
17:25, 7th Oct 2009 TriggerHappy187: There are far better damage detection systems than this. Unless you find someway to simplify this and not have it be so static, then it may be approvable.

Moderator

M

Moderator

17:25, 7th Oct 2009
TriggerHappy187:

There are far better damage detection systems than this.

Unless you find someway to simplify this and not have it be so static, then it may be approvable.
 
It would be better to simply only have this system detect when a unit is damaged, and have another blank trigger for any actions the user wants to add.

This way the user can do whatever they want when a unit is damaged. Sort of like this;

  • Actions
    • Events
    • Conditions
    • Actions
      • -------- What to do when a unit is damaged --------
      • Trigger - Run Trigger 1 <gen> (checking conditions)
      • Trigger - Run Trigger 2 <gen> (checking conditions)
And have the damage detection trigger run this.
 
Level 10
Joined
Jul 12, 2009
Messages
318
Doesn't seem to work quite right - if I start attacking a unit with the Chieftain, then quickly stop and cast Shockwave at it, it will still show a hit.

Also, what happens if a spell is cast, then the unit starts an attack (eg. a ranged unit), and the spell hits before the attack hits but after the attack started?
 
Level 9
Joined
May 9, 2009
Messages
536
Doesn't seem to work quite right - if I start attacking a unit with the Chieftain, then quickly stop and cast Shockwave at it, it will still show a hit.

Also, what happens if a spell is cast, then the unit starts an attack (eg. a ranged unit), and the spell hits before the attack hits but after the attack started?

thats an error... im not sure of that really as warcraft cant detect spell damage
 
Level 10
Joined
May 19, 2008
Messages
176
There is a work around to fix that bug. First of all you need a buff which is applied on attack, for example Ice attack. Now make a trigger with the unit takes damage event. Then in the trigger you save the attacker und the attacking unit in globals und execute another Trigger ( maybe you need to use a timer instat of a normal call ) in the other Trigger you need to show if the attacked unit has the ice buff. If it has the buff, remove it and you know, the unit was attacked by the attacking unit.

cedi
 
Level 6
Joined
May 1, 2009
Messages
215
Can't find any good use of it...
I think that if it display the damage suffered, it will be really usefull, but a simply text "hit" is useless...

Haven't tried it yet, but this system could be useful even with just the 'hit'. Realize in GUI there's no way to detect when a unit actually deals damage, only when a unit is attacking. This is problematic for some passive abilities players want to create using GUI. A hit detect system for GUI would be very useful, even if it only displayed 'hit'.
 
Level 6
Joined
May 1, 2009
Messages
215
(Specific Unit Event) - Entering unit suffers a damage

I'm no expert, but I'm pretty sure this doesn't work. Even if you tag a unit to a variable, the 'unit suffers damage' event can only refer to units that are placed in the map at map initialization (using GUI). When you use 'suffers damage' event it forces you to pick a unit already placed in the map.
 
Level 16
Joined
Oct 12, 2008
Messages
1,570
I'm no expert, but I'm pretty sure this doesn't work. Even if you tag a unit to a variable, the 'unit suffers damage' event can only refer to units that are placed in the map at map initialization (using GUI). When you use 'suffers damage' event it forces you to pick a unit already placed in the map.

Fail. How else do you think vJass damage detection systems work? In the exact same way. You can use that event for preplaced units, but you can also register events later on in the game, and register them with a unit variable. Not only preplaced units can be used, only specific units. It says specific, not preplaced, and ass variables hold a specific data, you can also register events with the current data of them.
 
Level 13
Joined
Mar 6, 2008
Messages
525
Fail. How else do you think vJass damage detection systems work? In the exact same way. You can use that event for preplaced units, but you can also register events later on in the game, and register them with a unit variable. Not only preplaced units can be used, only specific units. It says specific, not preplaced, and ass variables hold a specific data, you can also register events with the current data of them.

That is...
 
Level 1
Joined
Sep 8, 2010
Messages
2
Write the Damage and not "hit"

Your system is boring and not really important for good games. I mean everybody can write "hit", if a unit is attacked! If you write the damage and not
"hit", then your system is good!!!:xxd:
 
Top