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

Victory Rush

Status
Not open for further replies.
Level 1
Joined
Dec 5, 2015
Messages
3
Heyo, I'm currently working on an arena-like map with heroes n stuff (which was totally never done before, duh), and I'm making a warrior that should have an ability similar to Victory Rush from WoW. Except that he should regain HP everytime he kills an enemy with a specific ability. I've been trying to do this with triggers for the past 3 hours but nothing works as intended :p Maybe I'm blind or just stupid. Can anybody help me? :pcry:
 
Level 1
Joined
Dec 5, 2015
Messages
3
Aight - So, a trigger should:


Check if the ability 'Overhead-Smash' is being cast.

If yes, then afterwards it should check if the ability killed the target.

If it did, it should heal the caster for 250 HP.


Is that possible? Cause I can't seem to find the fitting triggers for that.
 
You need some type of damage detection. Bribe's system works for that, but I have no idea how to configure it. You could also check the target units health after a second or two. That's sorta cheating but it might get the effect you are looking for. However, if you were denied, then you would still get the bonus... not fair, huh?

try this - http://www.hiveworkshop.com/forums/spells.php?search=detection&d=list&r=20

You need to know when a unit was hit, not when an ability is cast. Blizzard has no event for this. That's why you need the system.
Once a unit is hit, you check to see what it was hit with and how much life the unit had and how much it has left. If it is 0, then you know your ability killed it and you can give your hero the bonus HPs.
 
Last edited:

Dr Super Good

Spell Reviewer
Level 63
Joined
Jan 18, 2005
Messages
27,180
Check if the ability 'Overhead-Smash' is being cast.
Not sure that is possible. Best you can do is check the current order of a unit.

If yes, then afterwards it should check if the ability killed the target.
Not possible to resolve from a periodic poll.

If it did, it should heal the caster for 250 HP.
Cannot resolve if the current order killed anything. As such this is not possible.

Is that possible?
No it is not possible from what I can tell. The sequence lacks enough context to be perfomed. For example you cannot tell when the current order kills a target. You can of course tell when an ability is cast, keep track of how long it is channelled and detect when units die and what killed them but that requires multiple triggers and is not implemented anything like what you are wanting.

Cause I can't seem to find the fitting triggers for that.
You cannot because it is not possible to do what you described.

You can possibly use different events to achieve what you want. However you have yet to explain what you want so I cannot be sure.

Please explain what you want. Not how you think it should be implemented. We are here to help you translate your requirements to an implementation or implementation design that does what you want.
 
Sounds like a cool idea! Here is how I'd approach it:

First, you'll want to trigger the damage for Overhead-Smash. This will make the detection process a lot easier. For the sake of simplicity, let's say that Overhead-Smash just deals some damage (you can modify the trigger however you'd like):
  • Overhead Smash
    • Events
      • Unit - A unit starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to Overhead Smash
    • Actions
      • Unit - Cause (Triggering unit) to damage (Target unit of ability being cast), dealing 500.0 damage of attack type Normal and damage type Normal
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • ((Target unit of ability being cast) is dead) Equal to True
        • Then - Actions
          • -------- Activate ability -------
        • Else - Actions
The trigger above just detects when Overhead Smash is used, it deals damage, and then checks if the unit is now dead. I can't guarantee whether this will work (I don't know whether wc3 flags units for death immediately after damage has been dealt, you should test it).

The part where it says "Activate Ability" is the main portion of concern. What you do there is really dependent on how you want to structure your ability. If you want it to be similar to Victory Rush, then you would probably start a timer (for about 8 seconds, for example). This would essentially be the user's "window" in which he can use the ability. If he uses the ability in that window, deal damage and heal the unit.

I'll wait for your response. We need a few more details on how you want your spell to work. For example, you could make it so that "Victory Rush" is activated when the caster gets a killing blow. Or you could make it so that it is activated only when the caster gets a killing blow with Overhead Smash. Orrr you can make it active at all times, but have it only restore HP if used after a killing blow from Overhead Smash. There are lots of permutations. :)
 
Level 24
Joined
Aug 1, 2013
Messages
4,657
I can tell you, this is definately possible.
But first, you have to explain what you want.

1, What is "Overhead-Smash" and how do you use it currently?
2, When does this effect has to occur? (Alternative requirements than killed by Overhead-Smash.)
 
Level 7
Joined
Nov 19, 2015
Messages
283
Sounds easy enough. Using the damage detection system just create a new damage type.

Trigger the spell and before you deal the damage change the damage type.

Check when that damage type is dealt and heal.

In the spell trigger
- Set NextDamageType = VictoryRush
- Unit - Cause.. to damage....
- Trigger - Run ClearDamageEvent (Checking Conditions)

Another trigger
-After damage event = 1
-DamageEventTarget is dead = true
-DamageEventType = VictoryRush
 
Level 24
Joined
Aug 1, 2013
Messages
4,657
3cFuAXl.png
 
Status
Not open for further replies.
Top