找回密码
 点一下
查看: 1523|回复: 3

请问大家 为什么我的这个技能WE保存时会出错

[复制链接]
发表于 2008-12-23 06:15:21 | 显示全部楼层 |阅读模式
创造一个单位 移动到哪里的 触发..
为什么这个触发保存是会出错...      请教各位高手了..      
我是新手.  不懂哪里有错误.
哪里造成的错误,导致无法保存

function Trig_Begin_Actions takes nothing returns nothing
    local unit caster = GetTriggerUnit()
    local unit aim
    local unit localunit
    local real x
    local real y
    local real angle
    local location pos
    if(GetUnitTypeId(caster) != 'Hmkg')then
        set spellid = GetSpellAbilityId()
        if(spellid == 'A004')then
            set aim = GetSpellTargetUnit()
            set x = GetUnitX(caster)
            set y = GetUnitY(caster)
            if(aim == null)then
                set pos = GetSpellTargetLoc()
                set angle = Atan2(GetLocationY(pos) - y,GetLocationX(pos) - x)
                call RemoveLocation(pos)
                set pos = null
            else
                set angle = Atan2(GetUnitY(aim) - y,GetUnitX(aim) - x)
                set aim = null
            endif
                set localunit = CreateUnit(playerid,'nskk',x,y,angle)
            call SetUnitPathing( localunit, false )
            call IssuePointOrder( localunit, "move", GetUnitX(localunit) + 800 * Cos(angle),GetUnitY(localunit) + 800 * Sin(angle) )
            call SetUnitFlyHeight( localunit, 100.00, 100.00 )
            call UnitRemoveAbility( localunit, 'Amrf' )
            endif
    set caster = null
endfunction
//===========================================================================
function InitTrig_Begin takes nothing returns nothing
    set gg_trg_Begin = CreateTrigger()
    set udg_indexA = 0
    loop
        call TriggerRegisterPlayerUnitEvent(gg_trg_Begin,Player(udg_indexA),EVENT_PLAYER_UNIT_SPELL_EFFECT,null)
        set udg_indexA = udg_indexA + 1
        exitwhen udg_indexA > 11
    endloop
    call TriggerAddAction(gg_trg_Begin,function Trig_Begin_Actions)
endfunction
发表于 2008-12-23 07:00:27 | 显示全部楼层
我也想知道啊...     请知道的  麻烦将一下好吗

以前我移植别人的东西时  也出现过.

请帮下忙.
回复

使用道具 举报

发表于 2008-12-23 07:02:53 | 显示全部楼层
帮下忙.  谢谢.  
回复

使用道具 举报

发表于 2008-12-23 18:07:17 | 显示全部楼层
已解决 请锁
回复

使用道具 举报

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

本版积分规则

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

GMT+8, 2024-10-6 04:14 , Processed in 0.142638 second(s), 20 queries .

Powered by Discuz! X3.5

© 2001-2023 Discuz! Team.

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