- Joined
- Mar 11, 2007
- Messages
- 63
Ok heres my code:
When I save this, I get an error that has something to do with 'TriggerSleepAction' being invalid (void).
JASS:
//===========================================================================
// NAME OF SPELL
//===========================================================================
function Pushback takes unit CastingUnit,unit PickedUnit returns nothing
local real ud=0.00
local real ua=0.00
set ud=(DistanceBetweenUnits(CastingUnit,PickedUnit)+40)
set ua=AngleBetweenUnits(CastingUnit,PickedUnit)
call SetUnitPositionLoc(GetEnumUnit(),PolarProjectionBJ(GetUnitLoc(CastingUnit),ud,ua))
endfunction
function Trig_Spell_Trigger_Actions takes nothing returns nothing
local unit cu=GetSpellAbilityUnit()
local real tr=0.00
if (GetSpellAbilityId()=='A000') then
loop
set tr=tr+1.00
exitwhen tr>100.00
call ForGroupBJ(GetUnitsInRangeOfLocAll(300,GetUnitLoc(cu)),Pushback(cu,GetEnumUnit()))
call TriggerSleepAction(2.00)
endloop
endif
endfunction
//===========================================================================
function InitTrig_Spell_Trigger takes nothing returns nothing
set gg_trg_Spell_Trigger = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_Spell_Trigger, EVENT_PLAYER_UNIT_SPELL_CAST )
call TriggerAddAction( gg_trg_Spell_Trigger, function Trig_Spell_Trigger_Actions )
endfunction
When I save this, I get an error that has something to do with 'TriggerSleepAction' being invalid (void).