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 :(
 

Emu.Man00

New Member
Reaction score
41
Just taking a stab at it, but have u tried checking for 'unit stats the effect of an ability'
&& 'ability being cast == reincarnation'
 

Genkora

Frog blast the vent core!
Reaction score
92
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.
 

3plX

New Member
Reaction score
3
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:
 

Emu.Man00

New Member
Reaction score
41
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.
 

Naga'sShadow

Ultra Cool Member
Reaction score
49
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.
 

Genkora

Frog blast the vent core!
Reaction score
92
off topic, sorry, but it loses track of triggering unit after 10 seconds? I wasn't aware of this.
 

Pyroflame

New Member
Reaction score
4
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.
 

Prometheus

Everything is mutable; nothing is sacred
Reaction score
590
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.
 

Faust

You can change this now in User CP.
Reaction score
123
With reincarnation, the unit does not die. Use the event Unit - Life becomes 0 instead (or less than 1)
 

Flow

New Member
Reaction score
4
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.
  • Ghan Ghan:
    Howdy
  • Ghan Ghan:
    Still lurking
    +3
  • The Helper The Helper:
    I am great and it is fantastic to see you my friend!
    +1
  • The Helper The Helper:
    If you are new to the site please check out the Recipe and Food Forum https://www.thehelper.net/forums/recipes-and-food.220/
  • Monovertex Monovertex:
    How come you're so into recipes lately? Never saw this much interest in this topic in the old days of TH.net
  • Monovertex Monovertex:
    Hmm, how do I change my signature?
  • tom_mai78101 tom_mai78101:
    Signatures can be edit in your account profile. As for the old stuffs, I'm thinking it's because Blizzard is now under Microsoft, and because of Microsoft Xbox going the way it is, it's dreadful.
  • The Helper The Helper:
    I am not big on the recipes I am just promoting them - I use the site as a practice place promoting stuff
    +2
  • Monovertex Monovertex:
    @tom_mai78101 I must be blind. If I go on my profile I don't see any area to edit the signature; If I go to account details (settings) I don't see any signature area either.
  • The Helper The Helper:
    You can get there if you click the bell icon (alerts) and choose preferences from the bottom, signature will be in the menu on the left there https://www.thehelper.net/account/preferences
  • The Helper The Helper:
    I think I need to split the Sci/Tech news forum into 2 one for Science and one for Tech but I am hating all the moving of posts I would have to do
  • The Helper The Helper:
    What is up Old Mountain Shadow?
  • The Helper The Helper:
    Happy Thursday!
    +1
  • Varine Varine:
    Crazy how much 3d printing has come in the last few years. Sad that it's not as easily modifiable though
  • Varine Varine:
    I bought an Ender 3 during the pandemic and tinkered with it all the time. Just bought a Sovol, not as easy. I'm trying to make it use a different nozzle because I have a fuck ton of Volcanos, and they use what is basically a modified volcano that is just a smidge longer, and almost every part on this thing needs to be redone to make it work
  • Varine Varine:
    Luckily I have a 3d printer for that, I guess. But it's ridiculous. The regular volcanos are 21mm, these Sovol versions are about 23.5mm
  • Varine Varine:
    So, 2.5mm longer. But the thing that measures the bed is about 1.5mm above the nozzle, so if I swap it with a volcano then I'm 1mm behind it. So cool, new bracket to swap that, but THEN the fan shroud to direct air at the part is ALSO going to be .5mm to low, and so I need to redo that, but by doing that it is a little bit off where it should be blowing and it's throwing it at the heating block instead of the part, and fuck man
  • Varine Varine:
    I didn't realize they designed this entire thing to NOT be modded. I would have just got a fucking Bambu if I knew that, the whole point was I could fuck with this. And no one else makes shit for Sovol so I have to go through them, and they have... interesting pricing models. So I have a new extruder altogether that I'm taking apart and going to just design a whole new one to use my nozzles. Dumb design.
  • Varine Varine:
    Can't just buy a new heatblock, you need to get a whole hotend - so block, heater cartridge, thermistor, heatbreak, and nozzle. And they put this fucking paste in there so I can't take the thermistor or cartridge out with any ease, that's 30 dollars. Or you can get the whole extrudor with the direct driver AND that heatblock for like 50, but you still can't get any of it to come apart
  • Varine Varine:
    Partsbuilt has individual parts I found but they're expensive. I think I can get bits swapped around and make this work with generic shit though
  • Ghan Ghan:
    Heard Houston got hit pretty bad by storms last night. Hope all is well with TH.
  • The Helper The Helper:
    Power back on finally - all is good here no damage
    +2
  • V-SNES V-SNES:
    Happy Friday!
    +1

      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