|
自己用T做好技能后转为了JASS,在自己的地图上使用没有任何问题,但是复制粘贴到别的图上好想就无效了,变量就一个并且已经在新图中重新声明了,也为触发开辟了空间,就是不知道哪有问题,代码如下
[codes=jass]
function Trig_dilei_001_Conditions takes nothing returns boolean
if ( not ( GetUnitTypeId(GetTriggerUnit()) == 'nglm' ) ) then
return false
endif
return true
endfunction
function Trig_dilei_001_Func001001003 takes nothing returns boolean
return ( IsUnitEnemy(GetFilterUnit(), GetOwningPlayer(GetTriggerUnit())) == true )
endfunction
function Trig_dilei_001_Func001002 takes nothing returns nothing
call UnitDamageTargetBJ( GetTriggerUnit(), GetEnumUnit(), ( GetUnitStateSwap(UNIT_STATE_MAX_LIFE, GetEnumUnit()) * 0.10 ), ATTACK_TYPE_CHAOS, DAMAGE_TYPE_MAGIC )
endfunction
function Trig_dilei_001_Actions takes nothing returns nothing
call ForGroupBJ( GetUnitsInRangeOfLocMatching(400.00, GetUnitLoc(GetTriggerUnit()), Condition(function Trig_dilei_001_Func001001003)), function Trig_dilei_001_Func001002 )
endfunction
//===========================================================================
function InitTrig_dilei_001 takes nothing returns nothing
set gg_trg_dilei_001 = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_dilei_001, EVENT_PLAYER_UNIT_DEATH )
call TriggerAddCondition( gg_trg_dilei_001, Condition( function Trig_dilei_001_Conditions ) )
call TriggerAddAction( gg_trg_dilei_001, function Trig_dilei_001_Actions )
endfunction
[/codes]
是不是还要在地图中加function InitCustomTriggers takes nothing returns nothing什么的来调用触发器函数?
盼高人解答 |
|