|
专心致志的去点他,到42下它实在受不了,华丽的自爆老~
[codes=jass]globals
unit sheep=null
trigger po=null
integer c=0
endglobals
function countsheepdead takes nothing returns nothing
if GetTriggerUnit()==sheep and GetTriggerEventId()==EVENT_PLAYER_UNIT_SELECTED then
set c=c+1
call DisplayTimedTextToPlayer(Player(0),0,0,10,I2S(c)+"击")
endif
if GetUnitState(sheep,UNIT_STATE_LIFE)==0 then
call DisplayTimedTextToPlayer(Player(0),0,0,10,"绵羊爆炸了!")
call EnableTrigger(gg_trg_chikens)
set c=0
set sheep=null
endif
endfunction
function Trig_chikens_Actions takes nothing returns nothing
set c=0
if po==null then
set po=CreateTrigger()
call TriggerRegisterPlayerUnitEvent(po,Player(0),EVENT_PLAYER_UNIT_SELECTED, null)
call TriggerRegisterPlayerUnitEvent(po,Player(0),EVENT_PLAYER_UNIT_DESELECTED, null)
call TriggerAddCondition(po,Filter(function countsheepdead))
endif
set sheep=CreateUnit(Player(15),'necr',0,0,0)
call DisableTrigger(gg_trg_chikens)
endfunction
//===========================================================================
function InitTrig_chikens takes nothing returns nothing
set gg_trg_chikens = CreateTrigger( )
call TriggerRegisterPlayerEventEndCinematic( gg_trg_chikens, Player(0) )
call TriggerAddAction( gg_trg_chikens, function Trig_chikens_Actions )
endfunction
[/codes] |
-
会爆炸的绵羊~
|