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

[Spell] Resurrect unit with 40% hp

Status
Not open for further replies.
Level 7
Joined
Aug 30, 2013
Messages
96
Hi, i have a medic hero in my map, i came up with a idea of creating a spell named "Resurrection", but i dont know how to do it.
Resurection: Medic restores to life 1 random unit in area close to her, resurected unit have 40% of original hp, and 30% buff to movement and attack speed.
Can someone help me with this? :)
 
Level 14
Joined
Jun 15, 2016
Messages
749
Hi, i have a medic hero in my map, i came up with a idea of creating a spell named "Resurrection", but i dont know how to do it.
Resurection: Medic restores to life 1 random unit in area close to her, resurected unit have 40% of original hp, and 30% buff to movement and attack speed.
Can someone help me with this? :)

I believe this can help you, maybe not everything but i hope you can figure this out

PHP:
Resurrect
    Events
        Unit - A unit Starts the effect of an ability
    Conditions
        (Ability being cast) Equal to Resurrection
    Actions
        -------- Above: Replace an active/non target based ability above --------
        -------- Below: Pick 1 random unit near the caster --------
        Unit Group - Pick every unit in (Random 1 units from (Units within 512.00 of (Position of (Casting unit)) matching (((Triggering unit) is dead) Equal to True))) and do (Actions)
            Loop - Actions
                -------- Below: Create a Dummy unit in position of your picked unit --------
                Unit - Create 1 Monster Lure for (Owner of (Casting unit)) at (Position of (Picked unit)) facing Default building facing degrees
                -------- Below: Order it to cast Resurrect spell (can save only 1 unit) --------
                Unit - Order (Last created unit) to Human Paladin - Resurrection
                -------- Below: Set HP, add Custom "item" bonus buffs to unit --------
                Unit - Set life of (Picked unit) to 40.00%
                Unit - Add Item Move Speed Bonus to (Picked unit)
                Unit - Add Item Attack Speed Bonus (Gloves of Haste) to (Picked unit)
 
Level 11
Joined
May 16, 2016
Messages
730
Hi, i have a medic hero in my map, i came up with a idea of creating a spell named "Resurrection", but i dont know how to do it.
Resurection: Medic restores to life 1 random unit in area close to her, resurected unit have 40% of original hp, and 30% buff to movement and attack speed.
Can someone help me with this? :)
Here is a almost passive ability based on Immolation.
It resurrect the closest unit (instead of random). It makes the spell more dynamic.
 

Attachments

  • RESURRECTION AURA.w3x
    16.4 KB · Views: 32
Level 11
Joined
May 16, 2016
Messages
730
If two units die at exactly the same place what happens? You need to detect the unit being resurrected and modify the life. One cannot assume the unit you intend to be resurrect actually gets resurrected.
If we talking about my template, then last picked in group dead unit gets resurrected (if units die exacly the same place).
Midasowski doesn't ask me about the template, so i think he is satisfied by that variant.
 
Status
Not open for further replies.
Top