Demi666
New Member
- Reaction score
- 127
kk so.... it says i have missing endfunctions and stuff, and i cant see no missing endfunction
also the if/then/else is wrong to it seems.
now i havent done jass in a while so you have to excuse my baaaaaaad coding
also the if/then/else is wrong to it seems.
now i havent done jass in a while so you have to excuse my baaaaaaad coding
JASS:
function Trig_Revival_Conditions takes nothing returns boolean
return IsUnitType(GetDyingUnit(),UNIT_TYPE_HERO)
endfunction
function Trig_Revival_Actions takes nothing returns nothing
local location l
local timer t
local unit u = GetDyingUnit()
local integer level = GetUnitLevel(u)
local real Wait = 5.00
local real WaitForRevive = Wait*level
if IsUnitEnemy(u,Player(0))
then set l = GetRectCenter(gg_rct_Inhabitant_Start)
else set l = GetRectCenter(gg_rct_Humans_Start)
call TimerStart(t,WaitForRevive,false.function Revive)
call CreateTimerDialog(t)
call TimerDialogDisplayForPlayerBJ(true,t,GetOwningPlayer(u))
endfunction
function Revive takes unit u location l returns nothing
call ReviveHeroLoc(u,l,true)
endfunction
//===========================================================================
function InitTrig_Revival takes nothing returns nothing
set gg_trg_Revival = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_Revival, EVENT_PLAYER_UNIT_DEATH )
call TriggerAddCondition( gg_trg_Revival, Condition( function Trig_Revival_Conditions ) )
call TriggerAddAction( gg_trg_Revival, function Trig_Revival_Actions )
endfunction