I'm currently working on the local variable death trigger thing for darkassaisin, but I've hit a bump.
Can someone paste this code into a trigger in a blank map and tell me what I'm doing wrong:
The map doesn't like my local variable declaration of the unit-type and I don't know why (that's the first line in the trigger if you can't see it)
maybe sats you can work on this thing while I work on your thing hehe
Can someone paste this code into a trigger in a blank map and tell me what I'm doing wrong:
Code:
function Trig_a_unit_dies_Actions takes nothing returns nothing
local unittype udg_DeadUnitType
local location udg_DeadUnitLocation
local player udg_DeadUnitOwner
set udg_DeadUnitType = GetUnitTypeId(GetDyingUnit())
set udg_DeadUnitLocation = GetUnitLoc(GetDyingUnit())
set udg_DeadUnitOwner = GetOwningPlayer(GetDyingUnit())
call TriggerSleepAction( 60.00 )
call CreateNUnitsAtLoc( 1, udg_DeadUnitType, udg_DeadUnitOwner, udg_DeadUnitLocation, bj_UNIT_FACING )
//===========================================================================
function InitTrig_a_unit_dies takes nothing returns nothing
set gg_trg_a_unit_dies = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_a_unit_dies, EVENT_PLAYER_UNIT_DEATH )
call TriggerAddAction( gg_trg_a_unit_dies, function Trig_a_unit_dies_Actions )
endfunction
The map doesn't like my local variable declaration of the unit-type and I don't know why (that's the first line in the trigger if you can't see it)
maybe sats you can work on this thing while I work on your thing hehe


