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

疑问,诡异的问题

[复制链接]
发表于 2011-1-9 00:46:17 | 显示全部楼层 |阅读模式
先上代码。
[jass]

library JSWLIB
//条件
function Trig_Js_W_Conditions takes nothing returns boolean
    if ( not ( GetSpellAbilityId() == 'A00H' ) ) then
        return false
    endif
    return true
endfunction
//计时器动作
function Js_Wzhouqi takes nothing returns nothing
    local integer i = GetHandleId(GetExpiredTimer())
    local unit u = LoadUnitHandle(hx,i,1)
    local unit u2 = LoadUnitHandle(hx,i,2)
    local real x = LoadReal(hx,i,3)
    local location d1 = GetUnitLoc(u2)
    local location d3 = GetUnitLoc(u)
    local unit u3
    local location d2  = PolarProjectionBJ((d1), GetRandomReal(20.00, 250.00), AngleBetweenPoints(d3,d1))
    local integer i2 = GetUnitAbilityLevelSwapped('A00H', u)+1
    if(x<=I2R(i2)) then
    call SetUnitPositionLoc(u,d2)
    set u3 = CreateUnitAtLoc(GetOwningPlayer(u),'ewsp',d3, AngleBetweenPoints(d3,d1))
    call UnitApplyTimedLifeBJ( 1.00, 'BHwe', u3 )
     call SetUnitVertexColor( u3, 255, 255, 255, 70 )
     call SetUnitAnimation(u3,"attack ")
    call UnitDamageTargetBJ( u, u2, I2R(GetHeroAgi(u, true)), ATTACK_TYPE_CHAOS, DAMAGE_TYPE_NORMAL )
    call SetUnitFacingToFaceLocTimed(u,d1,0)
    call SetUnitAnimation(u,"attack slam")
    set x = x+1.00
    call SaveReal(hx,i,3,x)
    set u3 =null
    set u =null
    set u2=null
    call RemoveLocation(d1)
    call RemoveLocation(d2)
    call RemoveLocation(d3)
    else
    call DestroyTimer(GetExpiredTimer())
    call FlushChildHashtable(hx,i)
    call UnitRemoveAbilityBJ('A00E',u)
    call SetUnitTimeScale( u, 1.00 )
    call SetUnitInvulnerable(u,false)
    call PauseUnit(u,false)
    set u =null
    set u2= null
    call RemoveLocation(d1)
    call RemoveLocation(d2)
    call RemoveLocation(d3)
    endif
endfunction
//主函数
function Trig_Js_W_Actions takes nothing returns nothing
    local unit u = GetTriggerUnit()
    local unit u2=GetSpellTargetUnit()
    local timer t = CreateTimer()
    local integer i = GetHandleId(t)
    call SetUnitTimeScale( u, 10.00 )
    call PauseUnit( u,true )
    call SetUnitInvulnerable( u, true )
    call UnitAddAbilityBJ('A00E',u)
    call SaveUnitHandle(hx,i,1,u)
    call SaveUnitHandle(hx,i,2,u2)
    call TimerStart(t,0.1,true,function Js_Wzhouqi)
    set u = null
    set u2= null
    set t = null
endfunction
//注册
function Js_W takes nothing returns nothing
    local trigger t  = CreateTrigger(  )
    call TriggerRegisterAnyUnitEventBJ(t, EVENT_PLAYER_UNIT_SPELL_EFFECT )
    call TriggerAddCondition(t, Condition( function Trig_Js_W_Conditions ) )
    call TriggerAddAction( t, function Trig_Js_W_Actions )
    set t = null
endfunction
endlibrary[/jass]
  1. //调用函数
  2. 事件游戏逝去0秒
  3. 动作-call Js_W
复制代码



这个原技能是风暴之锤。     没有call Js_W 就有眩晕效果 call了Js_W就无效果。问题很纠结
发表于 2011-1-9 01:34:36 | 显示全部楼层
一点都不诡异……你自己都设置它Invulnerable了,它自然就不会眩晕了。
回复

使用道具 举报

发表于 2011-9-11 12:00:31 | 显示全部楼层
我也来顶一下..








学习英语的广阔出路,信不信由你,反正我信了
回复

使用道具 举报

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

本版积分规则

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

GMT+8, 2024-5-4 00:38 , Processed in 0.178151 second(s), 19 queries .

Powered by Discuz! X3.5

© 2001-2023 Discuz! Team.

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