|
根据所学技能升级一个科技 如果到5级或者不是地图的第三个模式就删除之..
function MuzzleBrakeSuppressor takes nothing returns nothing
local unit u = GetTriggerUnit()
if GetLearnedSkill()=='A04S' then
if udg_Mode!=3 then
set bj_meleeNearestMineDist = GetUnitX(u)
set bj_lastTransmissionDuration = GetUnitY(u)
set udg_soundpath = "war3mapImported\\SuppressorOn2.mp3"
call ExecuteFunc("PlaySoundPath3D")
call SetPlayerTechResearched(u, 'R00O', GetPlayerTechCount(u,'R00O',true)+1 )
else
call IncUnitAbilityLevel(u,'A00J')
endif
if GetUnitAbilityLevel(u,'A04S')==5 and udg_Mode!=3 then
call DestroyTrigger(GetTriggeringTrigger())
endif
endif
set u = null
endfunction |
|