jia280753908 发表于 2018-11-7 20:15:33

关于JASS

function Trig____BOSS19___leiSuo1Func004002003 takes nothing returns boolean
return(((IsUnitType(GetFilterUnit(),UNIT_TYPE_STRUCTURE)==false)and((IsUnitEnemy(GetFilterUnit(),GetOwningPlayer(udg_T_Unit))==true)and((IsUnitAliveBJ(GetFilterUnit())==true)and(((GetOwningPlayer(GetFilterUnit())!=Player(PLAYER_NEUTRAL_PASSIVE))and(IsUnitHiddenBJ(GetFilterUnit())==false))and(IsUnitType(GetFilterUnit(),UNIT_TYPE_SAPPER)==false))))))
endfunction
function Trig____BOSS19___leiSuo1Func005A takes nothing returns nothing
call CreateNUnitsAtLoc(1,'e030',GetOwningPlayer(udg_T_Unit),udg_T_Point,bj_UNIT_FACING)
call IssueTargetOrder(GetLastCreatedUnit(),"thunderbolt",GetEnumUnit())
call IssueTargetOrder(GetLastCreatedUnit(),"thunderbolt",GetEnumUnit())
call SetUnitAbilityLevel(GetLastCreatedUnit(),'A0PZ',udg_Diff)
call IssueTargetOrder(GetLastCreatedUnit(),"chainlightning",GetEnumUnit())
call UnitApplyTimedLife(GetLastCreatedUnit(),'BHwe',1.00)
endfunction
function Trig____BOSS19___leiSuo1Actions takes nothing returns nothing
local group ydl_group
local unit ydl_unit
set udg_T_Unit=GetTriggerUnit()
set udg_T_Point=GetUnitLoc(udg_T_Unit)
set udg_S_Point=GetSpellTargetLoc()
set udg_FinalBOSS_Group=YDWEGetUnitsInRangeOfLocMatchingNull(160.00,udg_S_Point,Condition(function Trig____BOSS19___leiSuo1Func004002003))
call ForGroupBJ(udg_FinalBOSS_Group,function Trig____BOSS19___leiSuo1Func005A)
call EnableTrigger(gg_trg____BOSS19___LeiSuo2)
set ydl_group=null
set ydl_unit=null
endfunction
function InitTrig____BOSS19___leiSuo1 takes nothing returns nothing
set gg_trg____BOSS19___leiSuo1=CreateTrigger()
call TriggerRegisterAnyUnitEventBJ(gg_trg____BOSS19___leiSuo1,EVENT_PLAYER_UNIT_SPELL_EFFECT)
call TriggerAddCondition(gg_trg____BOSS19___leiSuo1,Condition(function Trig____BOSS19___leiSuo1Conditions))
call TriggerAddAction(gg_trg____BOSS19___leiSuo1,function Trig____BOSS19___leiSuo1Actions)
endfunction
function Trig____BOSS19___LeiSuo2Func001A takes nothing returns nothing
set udg_M_unit=GetEnumUnit()
set udg_M_Point=GetUnitLoc(udg_M_unit)
set udg_Angel=AngleBetweenPoints(udg_M_Point,udg_T_Point)
set udg_M_Point=PolarProjectionBJ(udg_M_Point,60.00,udg_Angel)
set udg_Real=DistanceBetweenPoints(udg_M_Point,udg_T_Point)
call SetUnitPathing(udg_M_unit,false)
call SetUnitPositionLoc(udg_M_unit,udg_M_Point)
call CreateNUnitsAtLoc(1,'e007',GetOwningPlayer(udg_T_Unit),udg_M_Point,bj_UNIT_FACING)
call KillUnit(GetLastCreatedUnit())
if(((udg_Real<40.00)or(IsUnitDeadBJ(udg_T_Unit)==true)))then
call DisableTrigger(GetTriggeringTrigger())
call GroupClear(udg_FinalBOSS_Group)
call SetUnitPathing(udg_M_unit,true)
call RemoveLocation(udg_S_Point)
call RemoveLocation(udg_T_Point)
call RemoveLocation(udg_M_Point)
else
endif
endfunction
function Trig____BOSS19___LeiSuo2Actions takes nothing returns nothing
call ForGroupBJ(udg_FinalBOSS_Group,function Trig____BOSS19___LeiSuo2Func001A)
endfunction
function InitTrig____BOSS19___LeiSuo2 takes nothing returns nothing
set gg_trg____BOSS19___LeiSuo2=CreateTrigger()
call DisableTrigger(gg_trg____BOSS19___LeiSuo2)
call TriggerRegisterTimerEventPeriodic(gg_trg____BOSS19___LeiSuo2,0.05)
call TriggerAddAction(gg_trg____BOSS19___LeiSuo2,function Trig____BOSS19___LeiSuo2Actions)


以上是一个技能代码,效果是范围的把单位拉到施放者身边,单位多的时候还很卡,有时候单位还出现无视碰撞体积的BUG,求大佬能不能帮我改下只拉单体目标而不是范围,而且单位一多之后单位就无视碰撞体积BUG的毛病能修复的了吗。或者有类似这种技能效果的演示图 也行

ck5524210 发表于 2018-12-7 12:25:31

直接用ydwe冲锋不就行了
页: [1]
查看完整版本: 关于JASS