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

Help for a spell

Status
Not open for further replies.
Level 15
Joined
Oct 29, 2012
Messages
1,474
First of all, you'll customize the ability 'Item Attack Speed Bonus (Greater)' in Object Editor, create a custom ability from it and modify it like this :
xduW3.jpg


Now you'll to trigger, detecting the first attack, you'll give the new ability to the hero, and with the second attack, increase the ability's level to 2 and adding a timer from the first attack, and when it ends remove the ability.

Try it , if you fail, I will try to make one for you (it's really easy though)
 
Level 11
Joined
Jun 26, 2014
Messages
497
First of all, you'll customize the ability 'Item Attack Speed Bonus (Greater)' in Object Editor, create a custom ability from it and modify it like this :
xduW3.jpg


Now you'll to trigger, detecting the first attack, you'll give the new ability to the hero, and with the second attack, increase the ability's level to 2 and adding a timer from the first attack, and when it ends remove the ability.

Try it , if you fail, I will try to make one for you (it's really easy though)

I want the spell to be passive. So when the hero stops attacking then the timer should start.

Also how do you use a damage detection system. It looks so complex.
 
Level 11
Joined
Jun 26, 2014
Messages
497
If I get up early enough tomorrow, I will make a video on how to set it up. Meanwhile, I have install instructions on the Damage Engine main page.

  • Rage
    • Events
      • Unit - A unit Is attacked
    • Conditions
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • ((Triggering unit) has buff Rage ) Equal to True
        • Then - Actions
          • Unit - Add Rage Passive to (Triggering unit)
          • Trigger - Turn on Rage Passive <gen>
        • Else - Actions
  • Rage Passive
    • Events
      • Unit - A unit Is attacked
    • Conditions
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • ((Triggering unit) has buff Rage ) Equal to True
        • Then - Actions
          • Unit - Increase level of Rage Passive for (Triggering unit)
          • Countdown Timer - Start Rage_timer as a One-shot timer that will expire in 10.00 seconds
        • Else - Actions
  • Rage Timer
    • Events
      • Time - Rage_timer expires
    • Conditions
    • Actions
      • Trigger - Turn off Rage Passive <gen>
Will this work???
 
Nope. "Triggering unit" in your trigger reference the target unit being attacked. Also "Range timer" will turn "Rage passive" off in 10 seconds, but "Rage" will turn "Rage passive back on as soon as a unit is attacked again.

It is next to impossible to make this kind of ability working properly without a damage detection system because wc3 editor doesn't support on-damage triggers. It only supports a damage event for a pre-defined static unit
 
Level 11
Joined
Jun 26, 2014
Messages
497
Nope. "Triggering unit" in your trigger reference the target unit being attacked. Also "Range timer" will turn "Rage passive" off in 10 seconds, but "Rage" will turn "Rage passive back on as soon as a unit is attacked again.

It is next to impossible to make this kind of ability working properly without a damage detection system because wc3 editor doesn't support on-damage triggers. It only supports a damage event for a pre-defined static unit

Well shit... I will think of an alternative then. Ty
 
I can install it but I have no idea how to use it.

The map has examples on how to use it. You know real variables? The system set a selected real variable to 1.00. You can detect in a trigger event when a real variable becomes 1.00. Look at this trigger:

  • OnDamage
    • Events
      • Game - PDD_damageEventTrigger becomes Equal to 1.00
    • Conditions
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • PDD_damageType Equal to PDD_PHYSICAL
        • Then - Actions
          • -------- Actions for PHYSICAL damage --------
          • -------- Block all physical damage from the Archmage --------
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • PDD_source Equal to Archmage 0001 <gen>
            • Then - Actions
              • Set PDD_amount = 0.00
            • Else - Actions
          • -------- Let the Blademaster heal 50 hitpoints on every attack --------
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • PDD_source Equal to Blademaster 0000 <gen>
            • Then - Actions
              • Set PDD_amount = -50.00
            • Else - Actions
          • Game - Display to (All players) for 10.00 seconds the text: ((Name of PDD_source) + ( damages + ((Name of PDD_target) + ( with damage: + (|cffff0000 + (String(PDD_amount)))))))
          • -------- End of Actions for PHYISCAL damage --------
        • Else - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • PDD_damageType Equal to PDD_SPELL
            • Then - Actions
              • -------- Actions for SPELL damage --------
              • -------- Double all spell damage from the Mountain King --------
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • PDD_source Equal to Mountain King 0002 <gen>
                • Then - Actions
                  • Set PDD_amount = (2.00 x PDD_amount)
                • Else - Actions
              • Game - Display to (All players) for 10.00 seconds the text: ((Name of PDD_source) + ( damages + ((Name of PDD_target) + ( with damage: + (|cff6495ed + (String(PDD_amount)))))))
              • -------- End of Actions for SPELL damage --------
            • Else - Actions
              • -------- Actions for CODE damage --------
              • Game - Display to (All players) for 10.00 seconds the text: ((Name of PDD_source) + ( damages + ((Name of PDD_target) + ( with damage: + (|cff32cd32 + (String(PDD_amount)))))))
              • -------- End of Actions for CODE damage --------
      • -------- Reflect 50 damage from the Kodo back on the damage source --------
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • PDD_target Equal to Kodo Beast 0006 <gen>
        • Then - Actions
          • Custom script: call UnitDamageTargetEx(udg_PDD_target, udg_PDD_source, 50.0, true, false, ATTACK_TYPE_CHAOS, DAMAGE_TYPE_UNIVERSAL, null)
        • Else - Actions

source: Physical Damage Detection for GUI v1.3.0.0

PDD_damageEventTrigger becomes equal to 1 right before a unit takes damage. You can then use variables like PDD_source to reference the attacking unit, PDD_amount to reference the damage amount, ect. So if you add "PDD_amount = PDD_amount * 2", you would basicly double the amount of damage dealt.
 
Sorry I thought you were showing him how to install looking for help's DDS
because I got confused here
You will also want to use a DDS that detects physical damage, and not the "unit is attacked" event. The attack-event can be triggered too easily by spamming the stop button without actually attacking.

http://www.hiveworkshop.com/forums/spells-569/gui-damage-engine-v3-5-4-1-a-201016/

and I didn't read the link >.< Anyway I also prefer your GUI one because I just feel more comfortable with it (probably not a very good reason :p). I'll check out your video when I have uncap data access tomorrow, thanks.
 
Level 24
Joined
Aug 1, 2013
Messages
4,657
@Bribe
hmm...
"Ok, this is a new thing that doesn't exist in most other damage systems. After damage events."
I recall people telling me that such a thing was stupid and should be removed to avoid problems.
Soon, noone wants to use a system that doesn't support it :D

@Krakenn99
Damage detection systems are very similar to each other.
There is literally no difference between weeps GDD, Bribe's GDE, looking_for_help's PDD, my ADE, or any other DDS that I have seen so far in the thing you want.

What you simply want is an event (that will replace "Unit - A unit Is attacked") that runs when a unit has hit an enemy with a basic attack.
This is a bit hard to do WC3 compatible but for example in Bribe's GUI Damage Engine, you can get very close to it with very few drawbacks.

The event is a customized event created with a global real variable.
You can find this event under "Game - Value Of Real Variable" (<Variable> becomes <Limit Operation> <Real>).
For example: MyRealVariable becomes Equal to 0.00
(This is a very basic way to create custom events.)

In Bribe's damage system, you want to use the variable "DamageModifierEvent" or "AfterDamageEvent" when they become equal to 1.00.
So:
  • Game - AfterDamageEvent becomes Equal to 1.00
Then your trigger will run when a unit has taken damage.
Now you want to filter out only basic attacks.
In Bribe's GDE, this can be done checking if "IsDamageSpell" is false (which means that the damage is not IsDamageSpell).
@Bribe: I find that a very limiting approach.
Anyway, you also want to check if the unit type of the attacker is he same as the unit type of the units you want to increase their attack speed of.
Or you check if they have the attack speed increasing ability, or item, or upgrade or whatever.
So:
  • IsDamageSpell Equal to False
  • (Unit-type of DamageEventSource) Equal to Paladin
(This will make the trigger filter out basic attacks of only paladins.)

Now you want to increase the attack speed of the "DamageEventSource".
This can be done using abilites and dummy units but I recommend you to use a stat system like BonusMod.
For now to simply see if the trigger's event and conditions work, you can add a "debug message".
A debug message is simply a notification that a piece of code works and what variables it has.
So you can do:
  • Game - Display to (All players) the text: ((Name of DamageEventSource) + now has increased attack speed.)
Now you run the map and see if your "paladin" will cause this message to appear whenever he hits a unit.
Once this works, we can head on to increasing attack speed.
 
Level 24
Joined
Aug 1, 2013
Messages
4,657
My name? Sorry I didnt watch the entire video... now trying to find my name :D

About IsDamageSpell... it is actually a kind of damage type (I call it HitType) however, you only allow 2 different hittypes even though I might want to add a few more.
Having IsDamageSpell apart from hittype also works but that simply adds more things to care about.

EDIT:
:DDD I guess I found a new pronoucation for my name :D
It is pronounced weet-lol, like "weed" but then a bit shorter cited and with a stronger d (= t) followed by the second syllable which is simply pronounced "lol".
The accent is placed on "Wiet".
And.. Nestaroos?

Anyway, Nestharus found the approach and I simply tested out the minimum change... which I see that you dont use :D
 
Last edited:
Status
Not open for further replies.
Top