- Joined
- Nov 3, 2006
- Messages
- 8
This is my trigger, its ment to revive creeps after a certain amount of time, but still allow the corpses to be exploded, raised, what ever. GUI cant handle it so i tried this, but wce bites!
JASS:
function jassreviveconds takes nothing returns boolean
if (not(GetOwningPlayer(GetTriggerUnit()) == Player(PLAYER_NEUTRAL_AGGRESSIVE) ) ) then
return false
endif
return true
endfunction
function jassreviveact takes nothing returns nothing
local unit res = GetTriggerUnit()
call CreateNUnitsAtLoc( 1 , GetUnitTypeId(GetTriggerUnit()), Player(PLAYER_NEUTRAL_AGGRESSIVE), GetUnitX( res ), GetUnitY( res ) , bj_UNIT_FACING )
set res = null
endfunction
//====================================
function gg_trg_jassrevive takes nothing returns nothing
call gg_trg_jassrevive (CreateTrigger( ))
call TriggerRegisterUnitEvent ( gg_trg_jassrevive , EVENT_PLAYER_UNIT_DEATH ) // this has "invalid number of arguments"
call TriggerAddCondition ( gg_trg_jassrevive, Condition( function jassreviveconds ) ) // this has " expected '(' "
call TriggerAddAction ( gg_trg_jassrevive, function jassreviveact ) // this also wants the '('
endfunction