Hi, thanks for looking.
I am having some trouble with my trigger it causes the game to crash when triggered. i have no idea why, but it does. Nobody else that i talk to seems to know what to do about it So i hope that someone can help me out.
I am having some trouble with my trigger it causes the game to crash when triggered. i have no idea why, but it does. Nobody else that i talk to seems to know what to do about it So i hope that someone can help me out.
JASS:
scope ChangeTerrainP1
private function actions takes nothing returns nothing
local location l
local real x
local real y
local integer i
call TriggerSleepAction ( 0.001 )
set l = GetUnitRallyPoint ( GetTriggerUnit() )
set x = GetLocationX(l)
set y = GetLocationY(l)
if 'T1x1' == GetUnitTypeId ( GetTriggerUnit() ) then
set i = 1
else
set i = 2
endif
if IsPointInRegion( area[0], x, y ) then
call SetTerrainType ( x, y, terrainid[0], -1, i, 1 )
endif
call RemoveLocation( l )
endfunction
//===========================================================================
function InitTrig_ChangeTerrainP1 takes nothing returns nothing
local trigger t = CreateTrigger()
call TriggerRegisterUnitEvent( t, gg_unit_T1x1_0010, EVENT_UNIT_ISSUED_POINT_ORDER )
call TriggerRegisterUnitEvent( t, gg_unit_T3x3_0009, EVENT_UNIT_ISSUED_POINT_ORDER )
call TriggerAddAction( t, function actions )
endfunction
endscope