找回密码
 点一下
查看: 967|回复: 2

单位位移不正常问题

[复制链接]
发表于 2011-4-4 10:22:55 | 显示全部楼层 |阅读模式
做了一个冲锋技能
用J写只是为了使用局部变量使其支持多人,但因为写J技术太渣,使其位移不正常,第一次冲,完好,第二次开始就会回到原点.......请指教
[jass]
function Trig_YMR_CZ_Actions takes nothing returns nothing
    local unit u = GetTriggerUnit()
    local location l = GetUnitLoc(GetTriggerUnit())
    local location l2 = GetSpellTargetLoc()
    local integer i
    local integer i2
    local real r
    local real r2
    set r = ( DistanceBetweenPoints(l, l2) / 5 )
    set r2 = AngleBetweenPoints(l, l2)
    call RemoveLocation(l2)
    set i = 1
    set i2 = 5   
    loop
        exitwhen i > i2
        set l = PolarProjectionBJ(l, r, r2)
        call SetUnitPositionLoc( u, l )
        call AddSpecialEffectLocBJ( l, "Abilities\\Spells\\Orc\\WarStomp\\WarStompCaster.mdl" )
        call DestroyEffect( GetLastCreatedEffectBJ() )
        call RemoveLocation(l)
        set i = i + 1
        call PolledWait( 0.01 )
    endloop
    set u = null
endfunction
[/jass]
发表于 2011-4-4 11:03:43 | 显示全部楼层
J无能为力 其实用T完全可以做出来的
回复

使用道具 举报

 楼主| 发表于 2011-4-4 13:46:10 | 显示全部楼层
好吧,自己知道问题了。
回复

使用道具 举报

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

本版积分规则

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

GMT+8, 2024-7-4 07:17 , Processed in 0.052496 second(s), 18 queries .

Powered by Discuz! X3.5

© 2001-2023 Discuz! Team.

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