如题目. 自己写了段代码 并把它放到自定义脚本里了. 请看.
[codes=jass]function Clengshang2 takes nothing returns boolean
if ( not ( udg_LengshangNumber != 1 ) ) then
return false
endif
if ( not ( GetEventDamageSource() == udg_Lengshang_Caster ) ) then
return false
endif
return true
endfunction
function Alengshang2_Func004C takes nothing returns boolean
if ( not ( GetRandomPercentageBJ() < I2R(( 3 + ( GetUnitAbilityLevelSwapped('A0E9', udg_Lengshang_Caster) * 11 ) )) ) ) then
return false
endif
return true
endfunction
function Alengshang2 takes nothing returns nothing
set udg_LengshangNumber = 1
if ( Alengshang2_Func004C() ) then
call UnitDamageTarget( udg_Lengshang_Caster, udg_Lengshang_Target, GetEventDamage(), true, true, ATTACK_TYPE_NORMAL, DAMAGE_TYPE_UNIVERSAL, WEAPON_TYPE_WHOKNOWS )
call AddSpecialEffectTargetUnitBJ( "head", udg_Lengshang_Target, "Abilities\\Spells\\Other\\CrushingWave\\CrushingWaveDamage.mdl" )
call DestroyEffect( GetLastCreatedEffectBJ() )
call DisableTrigger( GetTriggeringTrigger() )
else
endif
set udg_LengshangNumber = 0
endfunction
//===========================================================================
function a takes nothing returns nothing
local trigger ls2trg = CreateTrigger( )
call DisableTrigger( ls2trg )
call TriggerAddCondition( ls2trg, Condition( function Clengshang2 ) )
call TriggerAddAction( ls2trg, function Alengshang2 )
set ls2trg = null
endfunction[/codes]
问题来了...
为什么我在别的一个单位释放技能的触发里加了个 Call a()
他会提示缺少代码声明呀...
教程里.难道骗人的!!!!!!!!!!!!!!!!!!!!!!!!!!!!
用call a()的话 会提示: 错误的XXXX
两个都不行。 |