|
楼主 |
发表于 2008-11-6 15:34:25
|
显示全部楼层
好艰涩的做了好久 终于 做出来了 大大们看看哪里有错误
[jass]
function AIend takes nothing returns nothing
local integer iu = GetStoredInteger(udg_GC, I2S(H2I(GetExpiredTimer())) ,"AAA")
call IssueImmediateOrder( I2U(iu), "holdposition" )
call DestroyTimer(GetExpiredTimer())
endfunction
function Trig_test_Actions takes nothing returns nothing
set bj_lastStartedTimer = CreateTimer()
call CreateNUnitsAtLoc( 1, 'hfoo', GetOwningPlayer(GetTriggerUnit()), GetUnitLoc(GetTriggerUnit()), bj_UNIT_FACING )
call IssueTargetOrder( bj_lastCreatedUnit, "attack", GetTriggerUnit() )
call StoreInteger(udg_GC,I2S(H2I(bj_lastStartedTimer)),"AAA",H2I(bj_lastCreatedUnit))
call TimerStart( bj_lastStartedTimer, 10, false, function AIend)
endfunction
//===========================================================================
function InitTrig_test takes nothing returns nothing
set gg_trg_test = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_test, EVENT_PLAYER_UNIT_SPELL_EFFECT )
call TriggerAddAction( gg_trg_test, function Trig_test_Actions )
endfunction
[/jass] |
|