|
自己做了这么个Jass,因为高亮处原先在触发编辑器里是不能采取变量的。(T里的事件:一个单位是在多少范围内[A unit is in range])于是我就转换为了Jass,继而把高亮处换为了变量。
问题是:这个Jass行得通吗?
第一次作Jass...
T: MonSlaughterP1
function Trig_MonSlaughterP1_Func005C takes nothing returns boolean
if ( ( GetOwningPlayer(GetTriggerUnit()) == Player(PLAYER_NEUTRAL_AGGRESSIVE) ) ) then
return true
endif
if ( ( IsUnitType(GetTriggerUnit(), UNIT_TYPE_HERO) == true ) ) then
return true
endif
if ( not ( GetPlayerController(Player(0)) == MAP_CONTROL_COMPUTER ) ) then
return false
endif
return false
endfunction
function Trig_MonSlaughterP1_Conditions takes nothing returns boolean
if ( not ( GetUnitStateSwap(UNIT_STATE_LIFE, GetTriggerUnit()) >= 100.00 ) ) then
return false
endif
if ( not Trig_MonSlaughterP1_Func005C() ) then
return false
endif
return true
endfunction
function Trig_MonSlaughterP1_Actions takes nothing returns nothing
call IssueImmediateOrderBJ( udg_HeroP1, "windwalk" )
call TriggerSleepAction( 1.00 )
call IssueTargetOrderBJ( udg_HeroP1, "attack", GetTriggerUnit() )
endfunction
//===========================================================================
function InitTrig_MonSlaughterP1 takes nothing returns nothing
set gg_trg_MonSlaughterP1 = CreateTrigger( )
call TriggerRegisterUnitInRangeSimple( gg_trg_MonSlaughterP1, 500.00, udg_HeroP1 )
call TriggerAddCondition( gg_trg_MonSlaughterP1, Condition( function Trig_MonSlaughterP1_Conditions ) )
call TriggerAddAction( gg_trg_MonSlaughterP1, function Trig_MonSlaughterP1_Actions )
endfunction |
|