两仪末凪💫 cashsj1987
关注数: 0 粉丝数: 7 发帖数: 457 关注贴吧数: 21
关于在WE中制作LOL艾克R技能 以下为技能代码 // 核心触发器代码(JASS) globals constant real INTERVAL = 0.08 // 优化记录频率 constant integer MAX_FRAMES = 50 // 4秒轨迹(4/0.08) unit array shadowClones real array posX[MAX_FRAMES] real array posY[MAX_FRAMES] effect array trailFX integer historyIndex = 0 timer tracker = CreateTimer() unit ekkoHero endglobals function CleanOldClone takes integer idx returns nothing if shadowClones[idx] != null then call RemoveUnit(shadowClones[idx]) call DestroyEffect(trailFX[idx]) endif endfunction function SpawnClone takes integer idx returns nothing call CleanOldClone(idx) set shadowClones[idx] = CreateUnit(GetOwningPlayer(ekkoHero), 'h001', posX[idx], posY[idx], 0) call SetUnitAnimation(shadowClones[idx], "stand") call SetUnitVertexColor(shadowClones[idx], 100, 255, 100, 120) // 半透明绿 set trailFX[idx] = AddSpecialEffect("Abilities\\Spells\\NightElf\\Blink\\BlinkTarget.mdl", posX[idx], posY[idx]) endfunction function TrackMovement takes nothing returns nothing set posX[historyIndex] = GetUnitX(ekkoHero) set posY[historyIndex] = GetUnitY(ekkoHero) call SpawnClone(historyIndex) set historyIndex = ModuloInteger(historyIndex + 1, MAX_FRAMES) endfunction function ExecuteChronoBreak takes nothing returns nothing local integer rewindIndex = ModuloInteger(historyIndex - 38, MAX_FRAMES) // 3秒回溯 local real damageRadius = 425.00 local group targets = CreateGroup() // 时空撕裂特效 call DestroyEffect(AddSpecialEffect("war3mapImported\\TimeRift.mdx", posX[rewindIndex], posY[rewindIndex])) // 英雄传送 call SetUnitPosition(ekkoHero, posX[rewindIndex], posY[rewindIndex]) call DestroyEffect(AddSpecialEffect("Abilities\\Spells\\Human\\MassTeleport\\MassTeleportTarget.mdl", posX[rewindIndex], posY[rewindIndex])) // 范围伤害 call GroupEnumUnitsInRange(targets, posX[rewindIndex], posY[rewindIndex], damageRadius, null) loop set u = FirstOfGroup(targets) exitwhen u == null if IsUnitEnemy(u, GetOwningPlayer(ekkoHero)) then call UnitDamageTarget(ekkoHero, u, 350 + (50 * GetUnitAbilityLevel(ekkoHero, 'A001')), true, false, ATTACK_TYPE_CHAOS, DAMAGE_TYPE_UNIVERSAL, null) call SetUnitFlyHeight(u, 400, 1000) // 击飞效果 endif call GroupRemoveUnit(targets, u) endloop call DestroyGroup(targets) endfunction 为什么无法实现。。。
1 下一页