|
发表于 2010-11-21 20:05:58
|
显示全部楼层
并不是没有造成伤害,而是没有满足事件。
你的地图里的事件是【单位施法结束】,那么只有狮鹫骑士把施放乌云结束后才会触发事件。施法中途取消和被打断都不算的。
(多多利用显示文本信息,这个能War3的运行可视化)
玻璃渣的地图就在War3/maps/文件下内,找那些玻璃渣的自定义地图看。
没有的地图话随便找个带地图的版本更新补丁,送地图。
给你个触发器,把这个触发器复制进自己的地图可以检测施法状态。
[jass]
globals
trigger gg_trg_Test= null
endglobals
function Trig_Test_Actions takes nothing returns nothing
if GetTriggerEventId()==EVENT_PLAYER_UNIT_SPELL_CHANNEL then
call DisplayTimedTextToForce( GetPlayersAll(), 30, ( GetUnitName(GetTriggerUnit()) + ( "准备施放" + GetAbilityName(GetSpellAbilityId()) ) ) )
elseif GetTriggerEventId()==EVENT_PLAYER_UNIT_SPELL_CAST then
call DisplayTimedTextToForce( GetPlayersAll(), 30, ( GetUnitName(GetTriggerUnit()) + ( "开始施放" + GetAbilityName(GetSpellAbilityId()) ) ) )
elseif GetTriggerEventId()==EVENT_PLAYER_UNIT_SPELL_ENDCAST then
call DisplayTimedTextToForce( GetPlayersAll(), 30, ( GetUnitName(GetTriggerUnit()) + ( "停止施放" + GetAbilityName(GetSpellAbilityId()) ) ) )
elseif GetTriggerEventId()==EVENT_PLAYER_UNIT_SPELL_EFFECT then
call DisplayTimedTextToForce( GetPlayersAll(), 30, ( GetUnitName(GetTriggerUnit()) + ( "施法成功" + GetAbilityName(GetSpellAbilityId()) ) ) )
elseif GetTriggerEventId()==EVENT_PLAYER_UNIT_SPELL_FINISH then
call DisplayTimedTextToForce( GetPlayersAll(), 30, ( GetUnitName(GetTriggerUnit()) + ( "施法结束" + GetAbilityName(GetSpellAbilityId()) ) ) )
endif
endfunction
//===========================================================================
function InitTrig_Test takes nothing returns nothing
    set gg_trg_Test = CreateTrigger(  )
    call TriggerRegisterAnyUnitEventBJ( gg_trg_Test, EVENT_PLAYER_UNIT_SPELL_CHANNEL )
    call TriggerRegisterAnyUnitEventBJ( gg_trg_Test, EVENT_PLAYER_UNIT_SPELL_CAST )
    call TriggerRegisterAnyUnitEventBJ( gg_trg_Test, EVENT_PLAYER_UNIT_SPELL_ENDCAST )
    call TriggerRegisterAnyUnitEventBJ( gg_trg_Test, EVENT_PLAYER_UNIT_SPELL_EFFECT )
    call TriggerRegisterAnyUnitEventBJ( gg_trg_Test, EVENT_PLAYER_UNIT_SPELL_FINISH )
    call TriggerAddAction( gg_trg_Test, function Trig_Test_Actions )
endfunction
[/jass] |
|