Thread: Totally stumped
View Single Post
Old 08-30-2007, 12:40 AM   #1
Dil999's Avatar
Join Date: Dec 2006
Posts: 740

Dil999 has a spectacular aura about (82)Dil999 has a spectacular aura about (82)Dil999 has a spectacular aura about (82)

Send a message via AIM to Dil999 Send a message via MSN to Dil999 Send a message via Yahoo to Dil999
Default Totally stumped

This trigger should do damage every .10 seconds to every unit in lava. I tried everything to get it to work, and when I but debug messages in I realized, the actions arent even running! Can anyone tell why?
Collapse JASS:
function FirePit_Filter takes nothing returns boolean
    return GetTerrainType(GetUnitX(GetFilterUnit()),GetUnitY(GetFilterUnit())) == 'Dlav' 

function FirePit takes nothing returns nothing
    local group g = CreateGroup()
    local unit u
    local PlayerData pd = PlayerData(GetHandleInt(GetOwningPlayer(u),"pd"))
    call BJDebugMsg("running")
    call GroupEnumUnitsInRect(g,GetPlayableMapRect(),Filter(function FirePit_Filter))
            set u = FirstOfGroup(g)
            exitwhen u == null
                if not (pd.isfireimmune) and not (pd.isinvuln) then
                    call SetUnitState(u,UNIT_STATE_LIFE,GetUnitState(u,UNIT_STATE_LIFE) - 10.0)
            call GroupRemoveUnit(g,u)
    call DestroyGroup(g)
    set u = null

function InitTrig_FirePit takes nothing returns nothing
    set gg_trg_FirePit = CreateTrigger()
    call TriggerAddAction(gg_trg_FirePit,function FirePit)
    call TriggerRegisterTimerEvent(gg_trg_FirePit,0.05,true)
Early man walked away as modern man took control.
Their minds weren't all the same, to conquer was his big goal,
So he built his great empire and slaughtered his own kind,
Then he died a confused man, killed himself with his own mind.
Dil999 is offline   Reply With Quote
Sponsored Links - Login to hide this ad!