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

为什么没有运行1

[复制链接]
发表于 2007-11-5 18:20:15 | 显示全部楼层 |阅读模式
[codes=jass]
function M_4D_con takes nothing returns boolean
    if ( GetSpellAbilityId() == 'A04G' )  then
    return true
    endif
    return false
endfunction

function M4_D_Choose takes nothing returns boolean
return ( GetPlayerController(GetOwningPlayer(GetFilterUnit())) == MAP_CONTROL_USER )
endfunction

function M4_D_done takes nothing returns nothing
call SetUnitLifeBJ( GetEnumUnit(), ( GetUnitState(GetEnumUnit(), UNIT_STATE_LIFE) - udg_R_M1A ) )
endfunction

function M_4D_act takes nothing returns nothing
    local real x = GetUnitState(udg_Master4, UNIT_STATE_LIFE)
    local real y
    local group g
    local integer i
    local location p
    loop
        set p = GetUnitLoc(udg_Master4)
        set y = GetUnitState(udg_Master4, UNIT_STATE_LIFE)
        set g = GetUnitsInRangeOfLocMatching(700.00, p, Condition(function M4_D_Choose))
        call SetUnitState( udg_Master4, UNIT_STATE_LIFE, x )
        call ForGroupBJ( g, function M4_D_done )
        call RemoveLocation ( p )
        call DestroyGroup( g )
        set p = null
        set g = null
        set i = i + 1
        call PolledWait( 1.20 )
        exitwhen i > 30
    endloop
endfunction

//===========================================================================
function InitTrig_Master4D takes nothing returns nothing
    set gg_trg_Master4D = CreateTrigger(  )
    call TriggerRegisterPlayerUnitEventSimple( gg_trg_Master4D, Player(11), EVENT_PLAYER_UNIT_SPELL_CAST )
    call TriggerAddCondition( gg_trg_Master4D, Condition( function M_4D_con ) )
    call TriggerAddAction( gg_trg_Master4D, function M_4D_act )
endfunction
[/codes]
发表于 2007-11-5 19:41:53 | 显示全部楼层
提示: 作者被禁止或删除 内容自动屏蔽
回复

使用道具 举报

 楼主| 发表于 2007-11-5 20:52:15 | 显示全部楼层
郁闷。。。不是这个触发的问题
奇怪了
哪里呢。。。
回复

使用道具 举报

发表于 2007-11-6 13:19:46 | 显示全部楼层
我记得ZHUZHU BZ在某个帖子里面说了一下关于容易引起掉线的原因
回复

使用道具 举报

发表于 2007-11-7 12:31:02 | 显示全部楼层
GetUnitLevel(GetDyingUnit())<--------------这个在检查英雄单位level的时候貌似会返回5......

GetPlayerController(GetOwningPlayer(GetKillingUnitBJ())) == MAP_CONTROL_USER

这个函数可能是罪魁祸首,你解释一下这个语句什么意思?
回复

使用道具 举报

 楼主| 发表于 2007-11-7 21:04:23 | 显示全部楼层
上面说的是
那个单位的所有者是用户控制
回复

使用道具 举报

发表于 2007-11-8 12:02:36 | 显示全部楼层
取得所有者(取得控制者(取得凶手单位())) == 玩家控制

这个好像很多图都有用这样的
回复

使用道具 举报

 楼主| 发表于 2007-11-12 14:59:02 | 显示全部楼层
顶上来求助
回复

使用道具 举报

发表于 2007-11-12 15:34:31 | 显示全部楼层
提示: 作者被禁止或删除 内容自动屏蔽
回复

使用道具 举报

 楼主| 发表于 2007-11-12 19:20:19 | 显示全部楼层
我已经把问题改了。。。
回复

使用道具 举报

发表于 2007-11-12 20:28:39 | 显示全部楼层
下面的内容可能会解释这种情况:

{E80F2020-30D0-45B0-AEC2-BF447FAFDA1F}.jpg
回复

使用道具 举报

 楼主| 发表于 2007-11-13 06:51:38 | 显示全部楼层
引用第10楼朱朱于2007-11-12 20:28发表的  :
下面的内容可能会解释这种情况:


至于这么狠么
回复

使用道具 举报

发表于 2007-11-13 09:58:44 | 显示全部楼层
提示: 作者被禁止或删除 内容自动屏蔽
回复

使用道具 举报

 楼主| 发表于 2007-11-13 17:17:30 | 显示全部楼层
我想先知道为什么这个不好使。。。
回复

使用道具 举报

发表于 2007-11-13 17:28:24 | 显示全部楼层
提示: 作者被禁止或删除 内容自动屏蔽
回复

使用道具 举报

发表于 2007-11-13 17:31:38 | 显示全部楼层
提示: 作者被禁止或删除 内容自动屏蔽
回复

使用道具 举报

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

本版积分规则

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

GMT+8, 2024-6-4 08:59 , Processed in 0.151395 second(s), 21 queries .

Powered by Discuz! X3.5

© 2001-2023 Discuz! Team.

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