reincarnation

3plX

New Member
Reaction score
3
spell

Unit start effect of an ability
Ability being cast = Inner fire
Add reincanation to (target unit of ability being cast)
wait 10 sec.
remove Reincrnation from (target unit of ability being cast)

need help on removing reincrnation when unit dies.
i tried everything :(
 
Just taking a stab at it, but have u tried checking for 'unit stats the effect of an ability'
&& 'ability being cast == reincarnation'
 
Just taking a stab at it, but have u tried checking for 'unit stats the effect of an ability'
&& 'ability being cast == reincarnation'

reincarnation isn't really cast, it's a passive. That's like saing ability being cast == to critical strike. Reincarnation is a tricky thing, you could figure out how long it takes for reincarnation to work, then remove the ability after so much time.

I am at school and can't open WE, so i'll try my best

Event
A unit dies
Conditions
no conditions
Actions
wait (6 seconds) //or however many seconds it takes to revive
Remove (reincarnation) from (triggering unit)


that might work, but it's untested and could lead to trouble, assuming you have an error of a second and a unit dies immediatly after it revives, thus reviving again. The problem with revive spells is that you can't remove an ability from something that is dead.
 
Event
A unit dies
Conditions
no conditions
Actions
wait (6 seconds) //or however many seconds it takes to revive
Remove (reincarnation) from (triggering unit)

doesnt work

i tried

Event
every 10 sec of the game
Conditions
((Target unit of ability being cast) has buff Inner Fire Equal to false
Actions
Remove Reincarnation from (Target of ability being cast)

doesnt work either :confused:
 
Event
every 10 sec of the game
Conditions
((Target unit of ability being cast) has buff Inner Fire Equal to false
Actions
Remove Reincarnation from (Target of ability being cast)
The event is a timer; target unit of ability being cast is null.
 
Your gona need to set the unit to a variable. Otherwise the trigger loses track of Triggering unit after 10 seconds. I've got a spell that does something similar and I'll post it here, but its both incomplete and in VJass.

JASS:
scope Resurrection initializer init

    globals
        private constant integer SPELLID = 'A005'
        private constant integer BOOKID = 'A012'
        private constant string SFX = "Abilities\\Spells\\Human\\Resurrect\\ResurrectTarget.mdl"
        
        private unit caster
    endglobals
    
    private struct ss
        unit r
    endstruct
    
    private function timeout takes nothing returns nothing
        local timer t = GetExpiredTimer()
        local ss s = GetCSData(t)
        call UnitRemoveAbility(s.r, BOOKID)
    endfunction
    
    private function Duration takes integer lvl returns integer
        return 6 + (4 * lvl)
    endfunction
    
    
    private function ishero takes nothing returns boolean
        local unit u = GetEnumUnit()
        return IsUnitType(u, UNIT_TYPE_HERO) == true and IsUnitAlly(u, GetOwningPlayer(caster)) == true
    endfunction
    
    private function actions takes unit u returns nothing
        local ss s = ss.create()
        local group g = CreateGroup()
        local real x = GetUnitX(u)
        local real y = GetUnitY(u)
        local real x2
        local real y2
        local integer lvl = GetUnitAbilityLevel(u, SPELLID)
        local timer t = CreateTimer()
        local unit fog
        
        set caster = u
        
        call GroupEnumUnitsInRange(g, x, y, 1000, Filter( function ishero))
        call GroupAddUnit(g, u)
        
        loop 
            set fog = FirstOfGroup(g)
            exitwhen fog == null
            set x2 = GetUnitX(fog)
            set y2 = GetUnitY(fog)
            call DestroyEffect(AddSpecialEffect(SFX, x2, y2))
            call UnitAddAbility(fog, BOOKID)
            call SetPlayerAbilityAvailable(GetOwningPlayer(fog), BOOKID, false)
            set s.r = fog
            call SetCSData(t,s)
            call TimerStart(t, I2R(Duration(lvl)), false, function timeout)
            call GroupRemoveUnit(g, fog)
        endloop
    endfunction
            

    private function conditions takes nothing returns boolean
        if GetSpellAbilityId() == SPELLID then
            call actions(GetTriggerUnit())
        endif
        return false
    endfunction

    private function init takes nothing returns nothing
        local trigger t = CreateTrigger()
        call TriggerRegisterAnyUnitEventBJ(t, EVENT_PLAYER_UNIT_SPELL_EFFECT)
        call TriggerAddCondition(t, Condition( function conditions))
    endfunction
endscope


This is an area resurrection spell that gives all friendly hero's in range a single instance of reincarnation. I'm using an attached timer to keep track of the unit, each unit gets a timer. I'm at a loss to how you would replicate this in GUI though.
 
off topic, sorry, but it loses track of triggering unit after 10 seconds? I wasn't aware of this.
 
off topic, sorry, but it loses track of triggering unit after 10 seconds? I wasn't aware of this.

Me neither, it seems I've used it longer than that without trouble.

I always thought when you say something like "triggering unit" it recording it for you, and that's why there is leaks.
 
Group all units, if they have buff and no timer then give timer. When timer expires you remove thing. If have timer then don't give timer. Shouldn't be too hard with an attachment system and PUI.
 
With reincarnation, the unit does not die. Use the event Unit - Life becomes 0 instead (or less than 1)
 
The game does tend to lose track of it after 10 seconds, yes. Although I've heard that Triggering Unit is kept in memory longer than the SPECIFIC ACTIONing Unit (target unit of ability being cast, attacking unit etc.)
 
General chit-chat
Help Users
  • No one is chatting at the moment.
  • V-SNES V-SNES:
    Happy Friday!
    +1
  • The Helper The Helper:
    News portal has been retired. Main page of site goes to Headline News forum now
  • The Helper The Helper:
    I am working on getting access to the old news portal under a different URL for those that would rather use that for news before we get a different news view.
  • Ghan Ghan:
    Easily done
    +1
  • The Helper The Helper:
    https://www.thehelper.net/pages/news/ is a link to the old news portal - i will integrate it into the interface somewhere when i figure it out
  • Ghan Ghan:
    Need to try something
  • Ghan Ghan:
    Hopefully this won't cause problems.
  • Ghan Ghan:
    Hmm
  • Ghan Ghan:
    I have converted the Headline News forum to an Article type forum. It will now show the top 20 threads with more detail of each thread.
  • Ghan Ghan:
    See how we like that.
  • The Helper The Helper:
    I do not see a way to go past the 1st page of posts on the forum though
  • The Helper The Helper:
    It is OK though for the main page to open up on the forum in the view it was before. As long as the portal has its own URL so it can be viewed that way I do want to try it as a regular forum view for a while
  • Ghan Ghan:
    Yeah I'm not sure what the deal is with the pagination.
  • Ghan Ghan:
    It SHOULD be there so I think it might just be an artifact of having an older style.
  • Ghan Ghan:
    I switched it to a "Standard" article forum. This will show the thread list like normal, but the threads themselves will have the first post set up above the rest of the "comments"
  • The Helper The Helper:
    I don't really get that article forum but I think it is because I have never really seen it used on a multi post thread
  • Ghan Ghan:
    RpNation makes more use of it right now as an example: https://www.rpnation.com/news/
  • The Helper The Helper:
  • The Helper The Helper:
    What do you think Tom?
  • tom_mai78101 tom_mai78101:
    I will have to get used to this.
  • tom_mai78101 tom_mai78101:
    The latest news feed looks good

      The Helper Discord

      Members online

      No members online now.

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top