• Listen to a special audio message from Bill Roper to the Hive Workshop community (Bill is a former Vice President of Blizzard Entertainment, Producer, Designer, Musician, Voice Actor) 🔗Click here to hear his message!
  • Read Evilhog's interview with Gregory Alper, the original composer of the music for WarCraft: Orcs & Humans 🔗Click here to read the full interview.

An ability

Status
Not open for further replies.
Level 5
Joined
Apr 17, 2010
Messages
124
Not exactly sure If this is the right section, but I don't know how to make an ability do what i want it to. It's suppose to be called 'Healing Mark'.
It's basically heal and reincarnate put together; You heal a target for x(undecided) hp and leave a mark for say 30 seconds. If the target unit dies, its instantly revived. I already have it down, but I'm not sure if it works.
Heres the thing itself..

Events
Code:
Unit- A unit finishes casting an ability
Conditions
Code:
(Ability being cast)Equal to Healing Mark
Actions
Code:
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
    If - Conditions
        ((Targeted unit) is A Hero) Equal to True
    Then - Actions
        Set healingmarktarget = (Targeted unit)
        Set healingmark = 1
        Compatibility - Create the illusion of Healing Mark  with that buff's Effect model attached to (Targeted unit) on it's overhead
        Trigger - Turn on healing mark 2 <gen>
        Wait 30.00 seconds
        Trigger - Turn off healing mark 2 <gen>
    Else - Actions
        Do nothing

AND healing mark 2:
Events
Code:
Unit- A unit dies.
No conditions
Actions
Code:
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
    If - Conditions
        (Triggering unit) Equal to healingmarktarget
    Then - Actions
        Hero - Instantly revive healingmarktarget at (Position of (Dying unit)), Hide revival graphics
    Else - Actions
        Do nothing
 
Level 13
Joined
May 11, 2008
Messages
1,198
i don't think that will work. the reason being that the hero will still die...(if you don't care if heroes die then i guess it'll work, but as you said you want it to be like reincarnation so if that's the case you want it castable on heroes and them not to die, but to revive right away...)

give a custom reincarnation ability to the unit...remove it after a certain time. i'm not sure about cleanup because i haven't tested it, but that'll get you started.
 
It will work, but some things to change.
Use "Unit - A unit starts the effect of an ability", not "Unit - A unit finishes casting an ability", unless it's a channeling spell.

"Targeted unit" responds to the event "Unit - A unit acquires a target". In the events:
• Unit - A unit begins casting an ability
• Unit - A unit starts the effect of an ability
• Unit - A unit finishes casting an ability
the target unit is "Target unit of ability being cast", not "Targeted unit".

Plus, it leaks and it is not MUI.
You might want to take a look at the following tutorials:
http://www.hiveworkshop.com/forums/trigger-gui-editor-tutorials-279/variables-5896/
http://www.hiveworkshop.com/forums/triggers-scripts-269/things-leak-35124/
http://www.hiveworkshop.com/forums/trigger-gui-editor-tutorials-279/hashtables-mui-133407/
http://www.hiveworkshop.com/forums/...stanceabilty-timers-custom-values-more-96460/
 
Status
Not open for further replies.
Top