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

Healing Wave

Status
Not open for further replies.
Level 5
Joined
Mar 26, 2004
Messages
53
Anyone have a quick MUI/GUI script to make Crushing Wave/Carrion Swarm heal allies instead of damage enemies?

Changing the values to negative and then altering the targets does not work.
 
Level 24
Joined
Aug 1, 2013
Messages
4,657
I will give you the perfect solution.
I don't have the time at this moment but I will show it to you within 6 hours.

If anyone else knows how to do it then he/she may. I just posted this to tell you that your answer is coming.
 
Level 24
Joined
Aug 1, 2013
Messages
4,657
Took a little bit longer than expected but here it is.
Make an ability based of Channel and make it pretend it is Breath of Fire
Note that Target Type must be point or unit, follow time must be 0 and Options must be visible.

Then make an ability based of Breath of Fire and put there the desired AoE in.
Set the damage to 0, mana cost to 0 and duration to 0.01.
Make a new buff and set some lovely stuff.
Add that buff to the breath of fire.

Then make a dummy unit (if you don't know how to make a 'dummy' unit then tell me.
Add the breath of fire to that unit.

Now comes the trigger stuff.
Make this trigger:
  • Healing Wave
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to Healing Wave (Channel)
    • Actions
      • Set TempPlayer = (Owner of (Casting unit))
      • Unit - Create 1 Footman for Neutral Hostile at (Position of (Casting unit)) facing Default building facing degrees
      • Unit - Set level of Healing Wave for (Last created unit) to (Level of Healing Wave (Channel) for (Casting unit))
      • Unit - Add a 2.00 second Generic expiration timer to (Last created unit)
      • Unit - Order (Last created unit) to Neutral Pandaren Brewmaster - Breath Of Fire (Target point of ability being cast)
Then make another trigger:
  • Take Damage
    • Events
    • Conditions
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • ((Triggering unit) has buff Healing Wave ) Equal to True
        • Then - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
    • If - Conditions
      • ((Triggering unit) belongs to an ally of TempPlayer) Equal to True
    • Then - Actions
      • Unit - Set life of (Triggering unit) to ((Life of (Triggering unit)) + 100.00)
    • Else - Actions
      • Else - Actions
That last trigger has no initial events.
That means that it has to be called by another trigger or it must gain an event by another trigger.
We use that last one.

In any map initialization trigger, add the following line:
  • Unit Group - Pick every unit in (Units in (Playable map area)) and do (Actions)
    • Loop - Actions
      • Trigger - Add to Take Damage <gen> the event (Unit - (Picked unit) Takes damage)
And make the next trigger.
  • New Unit
    • Events
      • Unit - A unit enters (Entire map)
    • Conditions
    • Actions
      • Trigger - Add to Take Damage <gen> the event (Unit - (Entering unit) Takes damage)
Now you have your system.

Whenever a unit casts the channel ability, he creates a neutral hostile dummy that casts breath of fire to the target area.
That breath of fire does no damage and applies a buff.
Once a unit gains that buff and he is an ally of the original caster, he gains 100 health.

This doesn't work if a neutral hostile unit wants to cast it.
This doesn't work if healing wave is cast wile a previous healing wave is still under effect. (This can be helped by using JASS)

It may have some leaks but I don't really care that much :D
 

Chaosy

Tutorial Reviewer
Level 40
Joined
Jun 9, 2011
Messages
13,183
Hey, thanks for putting in the time on this. Problem is that I needed it to be castable by multiple units at the same time. Its for a generic caster unit.

Just use this.. it takes 1 min of work and is MUI obviously
set targets allowed to allies and set damage to negative aka -100
 
Level 24
Joined
Aug 1, 2013
Messages
4,657
Just use this.. it takes 1 min of work and is MUI obviously

Please do me a favor.
Go to the world editor and make it.
Once you did it, upload the map.

Or once you found out that those abilities cannot damage allied units (so also no negative damage). Just come here and tell us that you know why we need something like I made.

We can also wait until a true WC3 fan comes by and tells us that there is a hidden ability that does exacly what we want, but I doubt that that will happen.
 
Status
Not open for further replies.
Top