HomeUser Control Panel (unavailable in archive)ForumsTutorialsArt GalleryResourcesMaps

Death Terrain trigger in jass, o_O not working help plz

10-17-2006, 08:14 PM#1
Fr0zenLord
Hmmm, XD can anyone help my death terrain trigger isnt working
Collapse JASS:
function Trig_Death_Trigger_Actions takes nothing returns nothing
 local real x
 local real y
 local integer i
    loop
        exitwhen i > 3
           set x = GetUnitX(udg_Slider[i])
           set y = GetUnitY(udg_Slider[i])
    if GetTerrainType(x, y) == 'Lrok' then
    call KillUnit (udg_Slider[i])
    endif
    set i = ( i + 1 )
    endloop
    
endfunction

//===========================================================================
function InitTrig_Death_Trigger takes nothing returns nothing
    set gg_trg_Death_Trigger = CreateTrigger(  )
    call TriggerRegisterTimerEventPeriodic( gg_trg_Death_Trigger, 0.12 )
    call TriggerAddAction( gg_trg_Death_Trigger, function Trig_Death_Trigger_Actions )
endfunction

Simply, its suppost to kill me on Lordaeron rocky terrain
10-17-2006, 08:26 PM#2
Anopob
Maybe the way I'm saying is stupid, but...why won't you do a GUI "Every ... seconds" event with a "if unit = on terrain type" then "kill unit"?
10-17-2006, 08:28 PM#3
Captain Griffen
i is not declared. Will probably just crash the thread.
10-17-2006, 08:29 PM#4
Fr0zenLord
Cause im trying to learn jass? specificly, I could sum up 10 death triggers for different terrain in about 1-2 minutes, in GUI I know TONS, I want to do it in jass

Isnt this declaring i ?

local integer i

i get it
local integer i = 1

or set i = 1 lol tyvm guys