function Trig_Respawn01_Conditions takes nothing returns boolean
if ( not ( GetOwningPlayer(GetDyingUnit()) == Player(PLAYER_NEUTRAL_AGGRESSIVE) ) ) then
return false
endif
return true
endfunction
function Trig_Respawn01_Actions takes nothing returns nothing
local unit u = GetDyingUnit()
local location l = GetUnitLoc(u)
local real facing = GetUnitFacing(u)
call TriggerSleepAction( 70.00 ) //This is the wait time.
call CreateNUnitsAtLoc( 1, GetUnitTypeId(u), Player(PLAYER_NEUTRAL_AGGRESSIVE), l, facing )
call RemoveLocation(l)
endfunction
//===========================================================================
function InitTrig_Respawn01 takes nothing returns nothing
set gg_trg_Respawn01 = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_Respawn01, EVENT_PLAYER_UNIT_DEATH )
call TriggerAddCondition( gg_trg_Respawn01, Condition( function Trig_Respawn01_Conditions ) )
call TriggerAddAction( gg_trg_Respawn01, function Trig_Respawn01_Actions )
endfunction
function Trig_Respawn01_Conditions takes nothing returns boolean
if ( not ( GetOwningPlayer(GetDyingUnit()) == Player(11) ) ) then
return false
endif
return true
endfunction
function Trig_Respawn01_Actions takes nothing returns nothing
local unit u = GetDyingUnit()
local location l = GetUnitLoc(u)
local real facing = GetUnitFacing(u)
call TriggerSleepAction( 70.00 ) //This is the wait time.
call CreateNUnitsAtLoc( 1, GetUnitTypeId(u), Player(11), l, facing )
call RemoveLocation(l)
endfunction
//===========================================================================
function InitTrig_Respawn01 takes nothing returns nothing
set gg_trg_Respawn01 = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_Respawn01, EVENT_PLAYER_UNIT_DEATH )
call TriggerAddCondition( gg_trg_Respawn01, Condition( function Trig_Respawn01_Conditions ) )
call TriggerAddAction( gg_trg_Respawn01, function Trig_Respawn01_Actions )
endfunction
function Trig_Respawn01_Conditions takes nothing returns boolean
if ( not ( GetOwningPlayer(GetDyingUnit()) == Player(13) ) ) then // Player(0) = Player 1; Player(1) = Player 2; Player(2) = Player 3;....etc.
return false
endif
return true
endfunction
function Trig_Respawn01_Conditions takes nothing returns boolean
if ( not ( GetOwningPlayer(GetDyingUnit()) == Player(11) ) ) then
return false
endif
return true
endfunction
function Trig_Respawn01_Actions takes nothing returns nothing
local unit u = GetDyingUnit()
local location l = GetUnitLoc(u)
local real facing = GetUnitFacing(u)
call TriggerSleepAction( 5.00 ) //This is the wait time.
call CreateNUnitsAtLoc( 1, GetUnitTypeId(u), Player(11), l, facing )
call RemoveLocation(l)
endfunction
//===========================================================================
function InitTrig_Respawn01 takes nothing returns nothing
set gg_trg_Respawn01 = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_Respawn01, EVENT_PLAYER_UNIT_DEATH )
call TriggerAddCondition( gg_trg_Respawn01, Condition( function Trig_Respawn01_Conditions ) )
call TriggerAddAction( gg_trg_Respawn01, function Trig_Respawn01_Actions )
endfunction
You added 2 at some point, becuase in JASS player 1 is 0, player 2 is 1, ect ect. Therfore, brown in 11