Custom Ability Similar to Reincarnation

l)emonStorm

New Member
Reaction score
3
I am making a custom ability based off reincarnation. when a unit dies if the ability is cooled down, i want a ghost of the unit (i already made that) to appear at the players start location. The ghost can then move to the body of the dead unit (i created a permanent corpse) and ressurect it (i already made the ability). However, my trigger does not work, and i think it is because of the event. Any ideas? Here are my triggers: (i couldnt think of any way to do this without multiple triggers)
Code:
Self Preservation
    Events
        Unit - A unit Finishes (i tried Begins as well, same result) casting an ability
    Conditions
        (Ability being cast) Equal to Self Ressurection 
    Actions
        Set Self_Preservation_Unit = (Casting unit)
        Region - Center Self Preservation target <gen> on (Position of (Casting unit))
        Unit - Hide (Casting unit)
        Unit - Create 1 Ghastly Necromancer for (Owner of (Casting unit)) at (Center of Horde Circle of Power <gen>) facing Default building facing degrees
        Unit - Create a permanent Fleshy (Unit-type of (Casting unit)) corpse for (Owner of (Casting unit)) at (Position of (Casting unit)) facing (Facing of (Casting unit)) degrees
        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            If - Conditions
                (Item carried by (Casting unit) in slot (Max(1, 6))) Equal to Alliance Flag 0006 <gen>
            Then - Actions
                Unit - Order (Casting unit) to drop (Item being manipulated) at ((Owner of (Casting unit)) start location)
            Else - Actions
                Do nothing
        Wait 1.00 seconds
        Camera - Pan camera for (Owner of (Casting unit)) to (Position of (Last created unit)) over 0.00 seconds

Code:
Self Preservation
    Events
        Unit - A unit Finishes casting an ability
    Conditions
        (Ability being cast) Equal to Self Ressurection 
    Actions
        Set Self_Preservation_Unit = (Casting unit)
        Region - Center Self Preservation target <gen> on (Position of (Casting unit))
        Unit - Hide (Casting unit)
        Unit - Create 1 Ghastly Necromancer for (Owner of (Casting unit)) at (Center of Horde Circle of Power <gen>) facing Default building facing degrees
        Unit - Create a permanent Fleshy (Unit-type of (Casting unit)) corpse for (Owner of (Casting unit)) at (Position of (Casting unit)) facing (Facing of (Casting unit)) degrees
        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            If - Conditions
                (Item carried by (Casting unit) in slot (Max(1, 6))) Equal to Alliance Flag 0006 <gen>
            Then - Actions
                Unit - Order (Casting unit) to drop (Item being manipulated) at ((Owner of (Casting unit)) start location)
            Else - Actions
                Do nothing
        Wait 1.00 seconds
        Camera - Pan camera for (Owner of (Casting unit)) to (Position of (Last created unit)) over 0.00 seconds

Code:
Self Preservation
    Events
        Unit - A unit Finishes casting an ability
    Conditions
        (Ability being cast) Equal to Self Ressurection 
    Actions
        Set Self_Preservation_Unit = (Casting unit)
        Region - Center Self Preservation target <gen> on (Position of (Casting unit))
        Unit - Hide (Casting unit)
        Unit - Create 1 Ghastly Necromancer for (Owner of (Casting unit)) at (Center of Horde Circle of Power <gen>) facing Default building facing degrees
        Unit - Create a permanent Fleshy (Unit-type of (Casting unit)) corpse for (Owner of (Casting unit)) at (Position of (Casting unit)) facing (Facing of (Casting unit)) degrees
        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            If - Conditions
                (Item carried by (Casting unit) in slot (Max(1, 6))) Equal to Alliance Flag 0006 <gen>
            Then - Actions
                Unit - Order (Casting unit) to drop (Item being manipulated) at ((Owner of (Casting unit)) start location)
            Else - Actions
                Do nothing
        Wait 1.00 seconds
        Camera - Pan camera for (Owner of (Casting unit)) to (Position of (Last created unit)) over 0.00 seconds

Code:
Self Preservation 3
    Events
        Unit - A unit Begins casting an ability
    Conditions
        (Ability being cast) Equal to Ressurect Now 
    Actions
        Wait 0.50 seconds
        Unit - Unhide Self_Preservation_Unit
        Special Effect - Create a special effect attached to the origin of Self_Preservation_Unit using Abilities\Spells\Orc\Reincarnation\ReincarnationTarget.mdl
        Unit - Remove (Casting unit) from the game
 
Why doesn't it work? What happends?

He just wont get summoned?
 
nothing happens... the hero isnt hidden, the corpse doesnt appear, and the ghost is not there. thats y i think the event in the 1st trigger is the problem.
 
You cant detect reincarnation with a simple ability event, yes there is ways to detect reincarnation but that is to long to explain here ^^.
http://www.wc3jass.com/viewtopic.php?t=1996

An easier way may be something like this:

Use a timer to keep track on if the Reincarnation ability is cooled down or not.
This makes the ability not multi-instansable, only player-instansable (a player cannot have more than 1 unit with this ability).

Uses a Timer array (CooldownTimer)

Code:
    Events
        Unit - A unit Dies
    Conditions
        (Level of Reincarnation for (Triggering unit)) Greater than 0
        (Remaining time for CooldownTimer[(Player number of (Owner of (Triggering unit)))]) Equal to 0.00
    Actions
        Countdown Timer - Start CooldownTimer[(Player number of (Owner of (Triggering unit)))] as a One-shot timer that will expire in <Cooldown Time> seconds
        -------- Rest of the actions here, use triggering unit insteed of casting --------

Hopefully this helps
 
General chit-chat
Help Users
  • No one is chatting at the moment.
  • The Helper The Helper:
    Happy Thursday!
  • V-SNES V-SNES:
    Happy Friday!
    +1
  • The Helper The Helper:
    we were down for a minute - think a log file or something got too big
    +1
  • Ghan Ghan:
    The alerts say it was down for a while unfortunately.
  • Ghan Ghan:
    Didn't know what was going on while I was at work.
  • Ghan Ghan:
    Disk filled up with logs. Fixed now.
    +1
  • The Helper The Helper:
    not a problem at all thanks for getting us back up
  • The Helper The Helper:
    I think the bots are finding a way to get through the anubis
  • The Helper The Helper:
    Happy Wednesday Everyone! Hope everyone has a Fantastic Day!
    +1
  • The Helper The Helper:
    Yeah, stats are showing big bot influx like 12k page views.
  • Wizard Wizard:
    :wave:
    +1
  • Ghan Ghan:
    TH changed his avatar again. 6 more weeks of summer.
    +3
  • Wizard Wizard:
    lol
    +1
  • The Helper The Helper:
    Guys just a heads up I am going to be shutting the site down soon. I am just waiting on the NUON people to decide whether they want to transfer forum data and keep the discord. My email is [email protected] for anyone that wants to keep in touch and I have a facebook too. I will make an official post later. Love you guys and will miss everyone!
    +1
  • V-SNES V-SNES:
    Sent a pm @The Helper
  • Stephen Stephen:
    Oh no - please don't lose the Nuon content
    +1
  • The Helper The Helper:
    Someone email AtariAge and see if they want me to transfer the forum data over to it
  • Ghan Ghan:
    Could probably keep NUON stuff around here if we wanted.
  • Ghan Ghan:
    Hmm what to do about the World Editor site though?
  • Stephen Stephen:
    I'd rather personally just own a backup of the Nuon data than see it go to AtariAge honestly. If it gets enshittified as per usual, or if some of the "regular" Jaguar folks get there, it's not gonna be fun
  • The Helper The Helper:
    There will be a github of the forum data so the NUON Forum Data I guess would be available there
  • The Helper The Helper:
    World Editor is technically Ryoko stuff not mine you guys can keep that I am not in that even
  • jonas jonas:
    :( end of an era :(
  • The Helper The Helper:
    Dont think of it as an end jonas - think of it as a beginning, because really my friend that is what it is.

The Helper Discord

Members online

No members online now.

Affiliates

Hive Workshop NUON Dome World Editor Tutorials
Back
Top