找回密码
 点一下
查看: 1621|回复: 4

为什么没有运行3

[复制链接]
发表于 2007-11-14 09:15:41 | 显示全部楼层 |阅读模式
[codes=jass]
function Heros_die2 takes nothing returns boolean
    local integer lv = GetUnitLevel(udg_Player2)
    if ( GetDyingUnit() == udg_Player2 ) and ( GetUnitAbilityLevel(GetDyingUnit(), 'A00H') == 0 ) and ( UnitHasItemOfTypeBJ(GetDyingUnit(), 'ankh') == false ) then
    set udg_DeathPoint[2] = GetUnitLoc(udg_Player2)
    set udg_Int_die[2]=udg_Int_die[2]+1
    call SetPlayerStateBJ( Player(1), PLAYER_STATE_RESOURCE_FOOD_USED, udg_Int_die[2] )
    call StartTimerBJ( udg_T_Reincarnation[2], false,  udg_Int_die[2]  * 3 +lv  )
    call BJDebugMsg("玩家2复活开启")
    endif
    return false
endfunction

//===========================================================================
function InitTrig_Heros_die2 takes nothing returns nothing
    set gg_trg_Heros_die2 = CreateTrigger(  )
    call TriggerRegisterPlayerUnitEventSimple( gg_trg_Heros_die2, Player(1), EVENT_PLAYER_UNIT_DEATH )
    call TriggerAddCondition( gg_trg_Heros_die2, Condition( function Heros_die2 ) )
endfunction



function Reincarnation2 takes nothing returns boolean
    call ReviveHeroLoc( udg_Player2, udg_DeathPoint[2], true )
    call SetUnitManaPercentBJ( udg_Player2, 70.00 )
    call RemoveLocation( udg_DeathPoint[2] )
    set  udg_DeathPoint[2]=null
    call SelectUnitForPlayerSingle( udg_Player2, Player(1) )
    return false
endfunction

//===========================================================================
function InitTrig_Reincarnation2 takes nothing returns nothing
    set gg_trg_Reincarnation2 = CreateTrigger(  )
    call TriggerRegisterTimerExpireEventBJ( gg_trg_Reincarnation2, udg_T_Reincarnation[2] )
    call TriggerAddCondition( gg_trg_Reincarnation2, Condition( function Reincarnation2 ) )
endfunction
[/codes]

那条DEBUG显示了
玩家2是事先设置的Player2
但不知道为什么无法复活
发表于 2007-11-14 13:25:39 | 显示全部楼层
触发器界面下使用计时器数组需要设定数组大小否则不会初始化
回复

使用道具 举报

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

使用道具 举报

 楼主| 发表于 2007-11-15 16:15:20 | 显示全部楼层
恩。。。已经设置好了
YD真勤快
从U9转来的内容。。。
回复

使用道具 举报

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

使用道具 举报

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

本版积分规则

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

GMT+8, 2024-5-24 10:45 , Processed in 0.028657 second(s), 18 queries .

Powered by Discuz! X3.5

© 2001-2023 Discuz! Team.

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