that wont work unless you hide the reincarnation ability, since then you would see which units will ressurect. No, i don't think a preset ability will do it.
but i'm too tired to make up a solution to go around the wait
plus i don't think u would need 2 triggers for that
Lol good, u changed it to less than or equal to 10 instead of more than 10. that was what i meant with 90%.
Also, i don't think that's the problem, u don't need the variable and if/then/else thingie for it to work, that's basically the same thing as an condition if you set else to (do nothing)
It's the same, confused if it should work now
uhhhhh.
Mepehstrials system doesnt seem to work. i place abunch of skeleton warriors around and went about killing em, they just died. none of them revived. ill try out elites method and report back
i agree with terra, the problem is the wait. but i dont see a solution to it...
scope reviveunit
private function c takes nothing returns boolean
return GetUnitTypeId(GetDyingUnit()) == 'uske' //Replace 'uske' with the UnitTypeId of your unit (Ctrl + D in object editor)
endfunction
private function b takes nothing returns nothing
local unit u = GetDyingUnit()
local integer i2 = GetRandomInt(1, 10)
if i2 == 1 then
call TriggerSleepAction(5)
set bj_lastCreatedUnit = CreateUnit(GetOwningPlayer(u), GetUnitTypeId(u), GetUnitX(u), GetUnitY(u), GetUnitFacing(u))
call DestroyEffect(AddSpecialEffect("Abilities\\Spells\\Undead\\AnimateDead\\AnimateDeadTarget.mdl", GetUnitX(u), GetUnitY(u)))
call SetUnitAnimation(bj_lastCreatedUnit, "birth")
endif
set u = null
endfunction
function InitTrig_stuff takes nothing returns nothing
local trigger t = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( t, EVENT_PLAYER_UNIT_DEATH )
call TriggerAddCondition(t, Condition(function c))
call TriggerAddAction( t, function b )
set t = null
endfunction
endscope