找回密码
 点一下
查看: 2030|回复: 15

问一下,YDWE的跳劈怎么做???

[复制链接]
发表于 2010-7-16 15:03:54 | 显示全部楼层 |阅读模式
[trigger]
windwalk
    事件
        单位 - 任意单位 施放技能结束
    条件
        (施放技能) 等于 疾步风
    动作
        YD的技能<YDWE> - 命令 (触发单位) 向 0.00 方向跳劈,距离为 800.00 ,持续时间 3.00,刷新周期 0.01,最大高度 200.00,对途经敌人造成伤害值 100.00,在敌人的 chest 附加特效 Objects\Spawnmodels\Orc\OrcLargeDeathExplode\OrcLargeDeathExplode.mdl。

[/trigger]
命令 (触发单位) 向
0.00
方向跳劈
PS:加红的地方我不知道写什么


(难道我代码又反了???)
发表于 2010-7-16 15:09:05 | 显示全部楼层
去问guo吧,在u9啊心魔啊能见到他的
回复

使用道具 举报

发表于 2010-7-16 15:13:08 | 显示全部楼层
两点间方向
猜测的
回复

使用道具 举报

 楼主| 发表于 2010-7-16 15:13:47 | 显示全部楼层
额,那谁,怎么这么不负责?
回复

使用道具 举报

发表于 2010-7-16 15:16:27 | 显示全部楼层
很简单,你把它的函数拆开就什么都知道了
回复

使用道具 举报

 楼主| 发表于 2010-7-16 15:21:06 | 显示全部楼层
又是个不负责的。。。。。。
回复

使用道具 举报

发表于 2010-7-16 15:24:44 | 显示全部楼层
触发单位 的  面向角度

不过这不算不负责任:
一:没用过YD,不知道咋用。
二:你自己一试不就出来了?授人以鱼不如授人以渔嘛。。。
回复

使用道具 举报

发表于 2010-7-16 15:27:13 | 显示全部楼层
这个本来就不应该是我们管的问题……
YDWE是guo弄出来的,我们都没用过,原版WE支持者鹿过……

如果你说怎么写个跳劈,我们或许可以说出个大概,怎么调用别人的方法,这个还不如去问作者,而且作者应该还活跃着
回复

使用道具 举报

 楼主| 发表于 2010-7-16 16:40:19 | 显示全部楼层
好吧,只好。。。。。
回复

使用道具 举报

发表于 2010-7-16 16:47:03 | 显示全部楼层
触发单位的面向角度,试过没有??
回复

使用道具 举报

发表于 2010-7-16 17:18:11 | 显示全部楼层
既然有那个功能你用就是了,干嘛还要问为什么。另外见7L
回复

使用道具 举报

发表于 2010-7-16 19:04:45 | 显示全部楼层
ui都是everguo自己写的,wow8那边也能看到他,一直感觉这种ui会使weer水平无法提升,效果也没有自己做的好,而且兼容的东西都损失效率,要知道,专业摄影师是不会用傻瓜相机拍摄的
回复

使用道具 举报

发表于 2010-7-16 19:40:25 | 显示全部楼层
楼主你自己有负责人吗?

问出这种问题,还不是问原作者的,你要真想学JASS,自己看教程,或者直接提问都可以
你要想知道guo是怎么做的,我也告诉你了,拆开他的函数自己看

[jass]
function YDWETimerDestroyEffect takes real time,effect e returns nothing
    local integer N=0
    local integer i=0
    if time==0 then
        call DestroyEffect(e)
      else  
        set N=TimerSystem_Steps+R2I(time/TimerSystem_Timeout)   
        set i=YDWEGetIntegerByString("YDWETimerDestroyEffect"+I2S(N),"DestroyEffectNumber")   
        set i=i+1   
        call YDWESaveIntegerByString("YDWETimerDestroyEffect"+I2S(N),"DestroyEffectNumber",i)
        call YDWESaveEffectByString("YDWETimerDestroyEffect"+I2S(N),I2S(i),e)
        call YDWETimerSystem(time)     
    endif   
endfunction

        function YDWETimerPatternDamage takes real x, real y returns nothing
            local operate k = Temp_Struct
            local group opt = CreateGroup()
            local unit f=null
            local unit u=null
            local string part=YDWEGetStringByString(I2S(YDWEH2I(k.u)),"TimerPattern_part")  
            local string path=YDWEGetStringByString(I2S(YDWEH2I(k.u)),"TimerPattern_dsfx")  
            call GroupEnumUnitsInRange(opt, x, y, coll, null)
            loop
               set f = FirstOfGroup(opt)
               exitwhen f == null
               if IsUnitInGroup(f, k.g) == false then
                   if YDWETimerPatternEnemyFilter(f, k.u) then
                       call GroupAddUnit(k.g, f)
                       call UnitDamageTarget(k.u, f, k.data, true, true, TimerPattern_at, TimerPattern_dt, TimerPattern_wt)
                       call YDWETimerDestroyEffect( 2, AddSpecialEffectTarget(path, f, part) )
                       if not(k.recyclable) then
                           if GetUnitState(f, UNIT_STATE_LIFE) > 0.405 then
                               call YDWETimerPatternDummyCreateAider(k.u, x, y, allote, 0., k.dep, k.lord, f, 0., 0., k.order)
                           endif
                           call YDWETimerPatternRetrieve(k.u, k.perish)
                           call k.destroy()
                           //debug call BJDebugMsg("A one-time.")
                       endif
                   endif
               endif
               call GroupRemoveUnit(opt, f)
            endloop
            call DestroyGroup(opt)
            set opt = null
            set f = null               
        endfunction

        function YDWETimerPatternTreeKill takes nothing returns nothing
            local destructable d = GetEnumDestructable()
            if GetWidgetLife(d) > 0.405 then
                call KillDestructable(d)
            endif
            set d = null
        endfunction

    function YDWETimerPatternTreeFilter takes nothing returns boolean
        local integer id = GetDestructableTypeId(GetFilterDestructable())
        return id == 'LTlt' or id == 'ATtr' or id == 'BTtw' or id == 'KTtw' /*
          */or id == 'YTft' or id == 'JTct' or id == 'YTst' or id == 'YTct' /*
          */or id == 'YTwt' or id == 'JTtw' or id == 'DTsh' or id == 'FTtw' /*
          */or id == 'CTtr' or id == 'ITtw' or id == 'NTtw' or id == 'OTtw' /*
          */or id == 'ZTtw' or id == 'WTst' or id == 'GTsh' or id == 'VTlt' /*
          */or id == 'WTtw' or id == 'ATtc' or id == 'BTtc' or id == 'CTtc' /*
          */or id == 'ITtc' or id == 'NTtc' or id == 'ZTtc'
    endfunction

        function YDWETimerPatternRetrieve takes unit u, boolean wither returns nothing
            if not(wither) then
                call SetUnitFlyHeight(u, GetUnitDefaultFlyHeight(u), 5000.)
                call SetUnitAnimation(u, "stand")
                call SetUnitTimeScale(u, 1)
                if (GetLocalPlayer() == GetOwningPlayer(u)) then
                    call ClearSelection()
                    call SelectUnit(u, true)
                endif
            else
                call RemoveUnit(u)
            endif
        endfunction

        function YDWETimerPatternMove takes nothing returns nothing
            local operate k
            local integer i = 1
            local real x =0
            local real y =0
            local boolexpr b=null
            local rect r =null
            local location stupid=null
            local string osfx =null
            local string wsfx =null
            local string part =null
            if Total == 0 then
                //debug call BJDebugMsg("Timer paused.")
                call PauseTimer(t)
                set paused = true
            endif
            loop
                exitwhen i > Total
                set k = Structs
                if k.i != null and k.i != 0 then
                    if (GetLocalPlayer() == GetOwningPlayer(k.u)) then
                        call SelectUnit(k.u, false)
                    endif
                    if k.volume then
                        //debug call BJDebugMsg("Pathable without terrain.")
                        if (IsTerrainPathable(GetUnitX(k.u), GetUnitY(k.u), PATHING_TYPE_WALKABILITY) == true) then
                            //call DestroyEffect(AddSpecialEffectLoc(TimerPattern_osfx, GetUnitLoc(k.u)))                                 
                            set osfx=YDWEGetStringByString(I2S(YDWEH2I(k.u)),"TimerPattern_osfx")
                            if osfx!=null then
                                set part=YDWEGetStringByString(I2S(YDWEH2I(k.u)),"TimerPattern_part")
                                call DestroyEffect(AddSpecialEffectTarget(osfx,k.u,part))
                            endif   
                            set Structs = Structs[Total]   
                            set Total = Total - 1
                            set i = i - 1
                            set k.i = 0
                            set k.step = 0.
                            call YDWETimerPatternRetrieve(k.u, k.perish)
                            call k.destroy()
                            set k.u = null
                        endif
                    endif
                    set x = GetUnitX(k.u) + k.xvel
                    set y = GetUnitY(k.u) + k.yvel
                    if k.aviate then
                        set stupid = Location(x, y)
                        set k.z = k.z - GetLocationZ(stupid)
                        call SetUnitFlyHeight(k.u, k.z, 0.)
                        set k.z = k.z - k.zred
                        if k.z > GetUnitDefaultFlyHeight(k.u) then
                            set k.zred = k.zred + (grav / (1. / k.gap)) * 2.
                        else
                            set k.zred = 0.
                            call SetUnitFlyHeight(k.u, GetUnitDefaultFlyHeight(k.u), 500.)
                        endif
                        if k.z < 0. then
                            set k.z = 0.
                            set k.zred = 0.
                        endif
                        set k.z = k.z + GetLocationZ(stupid)
                        call RemoveLocation(stupid)
                        set stupid = null
                    endif
                    call SetUnitX(k.u, x)
                    call SetUnitY(k.u, y)
                    set k.sfx = k.sfx + 1
                    if k.follow then
                        if k.u != null and k.sfx == 1 and GetUnitFlyHeight(k.u) < 5. then
                            if IsTerrainPathable(x, y, PATHING_TYPE_FLOATABILITY) then
                                call DestroyEffect(AddSpecialEffect(TimerPattern_gsfx, x, y))
                            else
                                set wsfx=YDWEGetStringByString(I2S(YDWEH2I(k.u)),"TimerPattern_wsfx")
                                if wsfx!=null then
                                    set part=YDWEGetStringByString(I2S(YDWEH2I(k.u)),"TimerPattern_part")
                                    call DestroyEffect(AddSpecialEffectTarget(wsfx,k.u,part))
                                endif     
                                //call DestroyEffect(AddSpecialEffect(TimerPattern_wsfx, x, y))
                            endif
                        endif
                    endif
                    if k.sfx == 5 then
                        set k.sfx = 0
                    endif
                    if k.xvel * k.xvel + k.yvel * k.yvel < 2. then
                        if (GetUnitFlyHeight(k.u) - GetUnitDefaultFlyHeight(k.u)) * (GetUnitFlyHeight(k.u) - GetUnitDefaultFlyHeight(k.u)) < 5. then
                            set Structs = Structs[Total]
                            set Total = Total - 1
                            set i = i - 1
                            set k.i = 0
                            set k.step = 0.
                            call YDWETimerPatternRetrieve(k.u, k.perish)
                            call k.destroy()
                            set k.u = null
                        endif
                    else
                        set k.xvel = k.xvel - k.xvelred
                        set k.yvel = k.yvel - k.yvelred
                    endif
                    if k.killtrees then
                        set b = Condition(function YDWETimerPatternTreeFilter)
                        set r = Rect(x - coll, y - coll, x + coll, y + coll)
                        call EnumDestructablesInRect(r, b, function YDWETimerPatternTreeKill)
                        call DestroyBoolExpr(b)
                        set b = null
                        call RemoveRect(r)
                        set r = null
                    endif
                    if k.hostility then
                        set Temp_Struct = k
                        call YDWETimerPatternDamage(x, y)
                    endif
                    if k.parabola then
                        set k.step = k.step + seg
                        set k.height = k.apex * k.step - (k.apex / bot) * (k.step * k.step)
                        call SetUnitFlyHeight(k.u, k.sheight+k.height, 0.)
                    endif
                    if x > TimerPattern_MAX_X or x < TimerPattern_MIN_X or y > TimerPattern_MAX_Y or y < TimerPattern_MIN_Y then
                        set Structs = Structs[Total]
                        set Total = Total - 1
                        set i = i - 1
                        set k.i = 0
                        set k.step = 0.
                        call YDWETimerPatternRetrieve(k.u, k.perish)
                        call k.destroy()
                        set k.u = null
                       endif
                    set i = i + 1
                endif
            endloop
        endfunction

        function YDWETimerPatternSustain takes unit u, string id, integer pair, integer allah, real dist, real a, real time, real interval, real damage, real h, boolean killtrees, boolean injure, boolean cycle, boolean path, boolean ruin, boolean capriole, boolean sequel returns nothing
            local operate k = operate.create()
            local location stupid = Location(GetUnitX(u), GetUnitY(u))
            set k.g = CreateGroup()
            set k.u = u
            set k.order = id
            set k.dep = pair
            set k.lord = allah
            set k.gap = interval
            set k.data = damage
            set k.apex = h
            set k.xvel = 2 * (dist * Cos(a * .01745)) / (time / interval + 1)
            set k.yvel = 2 * (dist * Sin(a * .01745)) / (time / interval + 1)
            set k.xvelred = k.xvel / (time / interval)
            set k.yvelred = k.yvel / (time / interval)
            set k.zred = 0.
            set k.z = GetUnitFlyHeight(u) + GetLocationZ(stupid)
            set k.killtrees = killtrees
            set k.hostility = injure
            set k.recyclable = cycle
            set k.volume = path
            set k.perish = ruin
            set k.parabola = capriole
            set k.aviate = true // canfly
            set k.follow = sequel
            set k.i = 1
            set k.sfx = 0
            set k.sheight = GetUnitFlyHeight(u)
            set Total = Total + 1
            set Structs[Total] = k
            call SetUnitTimeScale(u, 1.)                        
            //call SetUnitTimeScale(u, rate)
            if capriole then
                call UnitAddAbility(u, 'Amrf')
                call UnitRemoveAbility(u, 'Amrf')
            endif
            if paused then
                //debug call BJDebugMsg("Timer resumed.")
                call TimerStart(t, interval, true, function YDWETimerPatternMove)
                set paused = false
            endif
            call RemoveLocation(stupid)
            set stupid = null
            //debug call BJDebugMsg("Knockback started!")
        endfunction

function YDWETimerPatternJumpAttack takes unit u,real face,real dis,real lasttime,real timeout,real high,real damage,string part,string dsfx returns nothing
    local boolean injure=false
    call YDWESaveStringByString(I2S(YDWEH2I(u)),"TimerPattern_part",part)  //两个存储函数,我就不拆了,你自己理解
    call YDWESaveStringByString(I2S(YDWEH2I(u)),"TimerPattern_dsfx",dsfx)              
    if damage>0 then
        set injure=true
    endif   
    call YDWETimerPatternSustain(u,null,0,0,dis,face,lasttime,timeout,damage,high,false,injure,true,false, false,true,false)        
endfunction
[/jass]

函数我只能给你拆到这里,不然的话恐怕会把他的整个系统都挖出来,其余的你自己看着办吧
回复

使用道具 举报

发表于 2010-7-16 20:32:57 | 显示全部楼层
(*^__^*) 嘻嘻……

YD技能合集-....-.w3x

71 KB, 下载次数: 69

回复

使用道具 举报

 楼主| 发表于 2010-7-16 20:43:08 | 显示全部楼层

回 13楼(1136496547) 的帖子

哈,我缺的正是这东东
回复

使用道具 举报

发表于 2010-7-16 20:50:56 | 显示全部楼层

Re:回 13楼(1136496547) 的帖子

引用第14楼橙子无敌于2010-07-16 20:43发表的 回 13楼(1136496547) 的帖子 :
哈,我缺的正是这东东   
不客气(*^__^*) 嘻嘻……
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 点一下

本版积分规则

Archiver|移动端|小黑屋|地精研究院

GMT+8, 2024-9-29 22:04 , Processed in 0.426599 second(s), 21 queries .

Powered by Discuz! X3.5

© 2001-2023 Discuz! Team.

快速回复 返回顶部 返回列表