HomeUser Control Panel (unavailable in archive)ForumsTutorialsArt GalleryResourcesMaps

Anybody know why this isn't working?

06-05-2003, 09:23 AM#1
Download
I cant see your post?
06-05-2003, 09:44 AM#2
Ultramagnetic
can you see this?



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

__________________
06-05-2003, 05:32 PM#3
Guest
if it works with one spell and not another i would think that the problem is your spell and not the code.

have tried playing around with the order issued?
you can test to see if the trigger is firing by having a text displayed when the trigger fires that says something like "it works." if you dont see that then you can narrow the list of suspects.




good luck
06-05-2003, 06:28 PM#4
Earth-Fury
forum ghost again O.o