| 07-26-2003, 08:26 AM | #1 |
function Trig_Caster_Built_Conditions takes nothing returns boolean if ( GetUnitTypeId(GetEnteringUnit()) == 'custom_h000' ) then return true endif if ( GetUnitTypeId(GetEnteringUnit()) == 'custom_h001' ) then return true endif if ( GetUnitTypeId(GetEnteringUnit()) == 'custom_o000' ) then return true endif if ( GetUnitTypeId(GetEnteringUnit()) == 'custom_o001' ) then return true endif return false endfunction function Trig_Caster_Built_Actions takes nothing returns nothing set udg_CasterCount = udg_CasterCount + 1 set udg_Caster[udg_CasterCount] = GetEnteringUnit() set udg_CasterMana[udg_CasterCount] = 255.00 set udg_CasterOrder[udg_CasterCount] = "" set udg_CasterTimer[udg_CasterCount] = -1.00 endfunction //=========================================================================== function InitTrig_Caster_Built takes nothing returns nothing set gg_trg_Caster_Built = CreateTrigger( ) call TriggerRegisterEnterRectSimple( gg_trg_Caster_Built, GetPlayableMapRect() ) call TriggerAddCondition( gg_trg_Caster_Built, Condition( function Trig_Caster_Built_Conditions ) ) call TriggerAddAction( gg_trg_Caster_Built, function Trig_Caster_Built_Actions ) endfunction yet I can't seem to note anything wrong with it, but I keep getting compile errors. It's function is to determine if one of those units enter the playable map area, and then set the variables...help? |
| 07-26-2003, 08:54 AM | #2 |
( GetUnitTypeId(GetEnteringUnit()) == 'custom_h000' ) is wrong. The value in ' ' needs to be just the 4-letter-code, so in this case probably just 'h000' |
| 07-26-2003, 09:14 AM | #3 |
wow....you deserve a hug! But I'm too tired sitting in my seat right now to give hugs...yeah....8) Urh, thanx...uh yeah...uh kewl...I forgot what I was going to type.... |
