Skeleton King Revive

Laiev

Hey Listen!!
when an unit dies, start a timer... then when the timer expire, slow units around (this simulate the delay of reincarnation)
 

keychup

Active Member
probably not, because a reincarnating hero doesn't die. i bet that reincarnation can be detected with "unit starts the effect of an ability"
 

Arberden

Active Member
So what you are saying is that if I use unit starts the effect of an ability and put the condition to ability being cast = reincarnation,then wait for time then slow the area.Is that how it is done?
 

Carnerox

The one and only.
You can try triggering it. Just make sure to work around stuff that checks when a unit dies.

Here's an example.
JASS:

scope Reincarnation initializer onInit
    globals
        private constant integer ABIL_ID = 'A000'
        private constant integer UNIT_ID = 'H000'
        private constant integer DUMMY_ID = 'hpea'
        private constant integer SLOW_ID = 'A001'
        private constant string CAST_ID = "thunderclap"
        private constant string EFFECT_ID = "Abilities\\Spells\\Human\\ReviveHuman\\ReviveHuman.mdl"
        group Revive_Group = CreateGroup()
    endglobals
    
    private struct Reincarnation
        static thistype this
        unit caster
        player owner
        integer level
        real casterX
        real casterY
        timer reviveTimer
        
        private static method Delay takes integer level returns real
            return 5.00-I2R(level)
        endmethod
        
        private static method Cooldown takes nothing returns real
            return 180.00
        endmethod
        
        private static method onCooldown takes nothing returns nothing
            call GroupRemoveUnit(Revive_Group,this.caster)
            call PauseTimer(this.reviveTimer)
            call DestroyTimer(this.reviveTimer)
        endmethod
        
        private static method onTimer takes nothing returns nothing
            local unit d
            call PauseTimer(this.reviveTimer)
            call DestroyTimer(this.reviveTimer)
            call ShowUnit(this.caster,true)
            call DestroyEffect(AddSpecialEffect(EFFECT_ID,this.casterX,this.casterY))
            set d=CreateUnit(this.owner,DUMMY_ID,this.casterX,this.casterY,0.00)
            call UnitApplyTimedLife(d,'BTLF',2.00)
            call UnitAddAbility(d,SLOW_ID)
            call SetUnitAbilityLevel(d,SLOW_ID,this.level)
            call IssueImmediateOrder(d,CAST_ID)
            set this.reviveTimer=CreateTimer()
            call TimerStart(this.reviveTimer,Cooldown,false,function thistype.onCooldown)
            set d=null
        endmethod
        
        private static method actions takes nothing returns nothing
            set this.caster=GetTriggerUnit()
            set this.owner=GetTriggerPlayer()
            set this.casterX=GetUnitX(this.caster)
            set this.casterY=GetUnitY(this.caster)
            set this.level=GetUnitAbilityLevel(this.caster,ABIL_ID)
            set this.reviveTimer=CreateTimer()
            if (GetUnitTypeId(this.caster)==UNIT_ID) and (this.level>0) then
                if (IsUnitInGroup(this.caster,Revive_Group)==false) then
                    call ReviveHero(this.caster,this.casterX,this.casterY,false)
                    call ShowUnit(this.caster,false)
                    call TimerStart(this.reviveTimer,Delay(this.level),false,function thistype.onTimer)
                    call GroupAddUnit(Revive_Group,this.caster)
                endif
            endif
        endmethod

        //===========================================================================
        private static method onInit takes nothing returns nothing
            local trigger trig = CreateTrigger()
            local integer index = 0
            set thistype.this=this.allocate()
            loop
                exitwhen index>=bj_MAX_PLAYER_SLOTS
                call TriggerRegisterPlayerUnitEvent(trig,Player(index),EVENT_PLAYER_UNIT_DEATH,null)
                set index=index+1
            endloop
            call TriggerAddAction(trig,function thistype.actions)
        endmethod
    endstruct
endscope
 

keychup

Active Member
Just did a couple of tests and here's what i found out:

1-Reincarnation is not detected by "Event - A unit starts the effect of an ability"
2-Reincarnation is not detected by "Event - A unit dies"
 
You can use an ability based on spawn hydra. It summons a unit when the hero dies, even if it will reincarnate. Then you can check a "Unit spawns a summoned unit" event.

Here are some rough triggers (NOT MUI! :p ) that should give you an idea of how to get this working. (I had the dummy unit use a thunderclap spell for the slow. You would have to create a custom thunderclap with the slow and damage values and effects you want and give it to the dummy as a unit ability)


Trigger:
  • Reincarnation
    • Events
      • Unit - A unit Spawns a summoned unit
    • Conditions
      • (Unit-type of (Summoned unit)) Equal to Reincarnation Dummy
    • Actions
      • Set ReincarnationDummy = (Summoned unit)
      • Set ReincarnationHero = (Summoning unit)
      • Countdown Timer - Start ReincarnationTimer as a One-shot timer that will expire in 3.00 seconds


Trigger:
  • Reincarnation Death
    • Events
      • Unit - A unit Dies
    • Conditions
      • (Triggering unit) Equal to ReincarnationHero
    • Actions
      • Countdown Timer - Pause ReincarnationTimer
      • Unit - Remove ReincarnationDummy from the game
      • Set ReincarnationDummy = No unit
      • Set ReincarnationHero = No unit


Trigger:
  • Reincarnation Slow
    • Events
      • Time - ReincarnationTimer expires
    • Conditions
    • Actions
      • Unit - Order ReincarnationDummy to Human Mountain King - Thunder Clap
      • Unit - Add a 1.00 second Generic expiration timer to ReincarnationDummy
      • Set ReincarnationDummy = No unit
      • Set ReincarnationHero = No unit
 
General chit-chat
Help Users
  • No one is chatting at the moment.
  • tom_mai78101 tom_mai78101:
    I have a GIF though
  • tom_mai78101 tom_mai78101:
    In the GIF, I've configured it so the lower the "Main Value" is, the better. I had to compress it pretty far down though.
  • tom_mai78101 tom_mai78101:
    And this is the thread with the video that shows the wall clip. https://tasvideos.org/Forum/Topics/23453
    +2
  • tom_mai78101 tom_mai78101:
    Hmm, about the Headline News, I noticed threads are being moved into the subforum (Health News, Environmental News, etc.). When that happens, the TH Forum Home page loses the articles, and instead would show old articles posted 1 or 2 weeks ago.
  • tom_mai78101 tom_mai78101:
    What do we do with the Home page?
  • Ghan Ghan:
    I added those forums to the filter for that widget.
  • tom_mai78101 tom_mai78101:
    Oh nice. They're back. Thanks.
  • tom_mai78101 tom_mai78101:
    Now I think it makes more sense for me to put news in their own subforums, without worry.
  • The Helper The Helper:
    Awesome Ghan thanks! I was purposely not moving the first 15 news articles in Headline news to the different subforums but I guess I don't have to do that now?
  • tom_mai78101 tom_mai78101:
    Question: Is there a way to remove thread redirects? It creates a copy of the moved thread and takes up space, and I am leaning towards wanting to remove them in the Headline News. But if they have an expiration date, I guess I'm fine with it.
  • The Helper The Helper:
    If you move a thread please leave a permanent redirect. You can delete any redirects after 6 months. The redirects are left to help Search Engines find the moved content.
  • tom_mai78101 tom_mai78101:
    What if you move the permanent redirect, not the thread?
  • The Helper The Helper:
    I think that works but I have not messed with it. You can delete redirects though if you have to that will not delete the original thread
  • The Helper The Helper:
    if a redirect ends up in the same forum as the post it goes to though I think the redirect drops or fails or something but they are not bugged out and when you are working on an indirect the original post is safe.
  • The Helper The Helper:
    Happy Early Friday :)
    +1
  • V-SNES V-SNES:
    Happy Friday :)
  • tom_mai78101 tom_mai78101:
    Fun Friday for me
  • tom_mai78101 tom_mai78101:
    Happy Fun Friday to all.
    +2
  • The Helper The Helper:
    Happy Sunday everyone!!!
  • V-SNES V-SNES:
    Happy Sunday!!!
    +1
  • jonas jonas:
    Happy monday :p
  • jonas jonas:
    Everyone hates mondays?
    +1
  • The Helper The Helper:
    Happy Tuesday!
  • jonas jonas:
    Happy belated tuesday

    Staff online

    Members online

    Affiliates

    Hive Workshop NUON Dome World Editor Tutorials

    Network Sponsors

    Apex Steel Pipe - Buys and sells Steel Pipe.
    Top