|
为什么有的时候不使用BJ函数却不能实现效果?
[codes=jass]
function bbb takes nothing returns nothing
call TimerDialogDisplay( udg_ReviveC[ GetUnitPointValue( GetDyingUnit() ) ], true )
call DestroyTimerDialog( udg_ReviveC[ GetUnitPointValue( GetDyingUnit() ) ] )
call DestroyTimer( udg_Revive[ GetUnitPointValue( GetTriggerUnit() ) ] )
call ReviveHero( GetDyingUnit(), 100, 100, true )
endfunction
function aaa takes nothing returns nothing
if (not ( IsUnitType( GetTriggerUnit() , UNIT_TYPE_HERO ) == true ) ) then
return
endif
set udg_Revive[ GetUnitPointValue( GetTriggerUnit() ) ] = CreateTimer()
call TimerStart( udg_Revive[ GetUnitPointValue( GetTriggerUnit() ) ], 10, false, function bbb )
call CreateTimerDialog( udg_Revive[ GetUnitPointValue( GetTriggerUnit() ) ] )
call TimerDialogSetTitle( bj_lastCreatedTimerDialog, GetUnitName( GetTriggerUnit() ) )
set udg_ReviveC[ GetUnitPointValue( GetTriggerUnit() ) ] = bj_lastCreatedTimerDialog
call TimerDialogDisplay( bj_lastCreatedTimerDialog, false )
return
endfunction
//===========================================================================
function InitTrig_Death takes nothing returns nothing
set gg_trg_Death = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_Death, EVENT_PLAYER_UNIT_DEATH )
call TriggerAddCondition( gg_trg_Death, Condition( function aaa ) )
endfunction
[/codes]
这个触发用了后无法复活,而且不显示计时器窗口!!!!但是我改成BJ函数却能实现!(但是不能复活英雄,只有窗口)这是怎么回事????????????
我用的 NEW GEN
在论坛设置JASS字体高亮怎么做的?????? |
|