| 06-05-2003, 09:34 AM | #1 |
it works fine when I use the regular unholy frenzy, but when I plant my custom slk in the map with the custom spell based off it, it doesn't seem to want to carry out the added actions.... function Trig_FastForward_Conditions takes nothing returns boolean return ( ( GetIssuedOrderIdBJ() == String2OrderIdBJ("unholyfrenzy") ) and ( GetUnitTypeId(GetOrderedUnit()) == 'Hamg' ) ) endfunction function Trig_FastForward_Actions takes nothing returns nothing local real mana = GetUnitStateSwap(UNIT_STATE_MANA, GetOrderedUnit()) local unit caster = GetOrderedUnit() set udg_FFCast = true loop exitwhen (( mana > GetUnitStateSwap(UNIT_STATE_MANA, caster)) or (udg_FFCast == false)) call TriggerSleepAction( 0.01 ) endloop if (udg_FFCast == false) then return endif call CreateNUnitsAtLocFacingLocBJ( 1, 'eC01', Player(0), GetOrderPointLoc(), GetUnitLoc(GetTriggerUnit()) ) set udg_Booster = GetLastCreatedUnit() endfunction //=========================================================================== function InitTrig_FastForwardCode takes nothing returns nothing set gg_trg_FastForwardCode = CreateTrigger( ) call TriggerRegisterPlayerUnitEventSimple( gg_trg_FastForwardCode, Player(0), EVENT_PLAYER_UNIT_ISSUED_TARGET_ORDER ) call TriggerAddCondition( gg_trg_FastForwardCode, Condition( function Trig_FastForward_Conditions ) ) call TriggerAddAction( gg_trg_FastForwardCode, function Trig_FastForward_Actions ) endfunction |
