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

沟壑技能没效果,怎么回事!

[复制链接]
发表于 2010-9-4 16:20:36 | 显示全部楼层 |阅读模式
部分变量,函数 没贴出来,整体经过JassCraft 检查无错,魔兽运行通过,但在魔兽里技能施放的时候没效果!
[jass]
  
function DestructableRemoveCond takes nothing returns boolean
local trigger trg=GetTriggeringTrigger()
local string key=H2S(trg)
local destructable Dstr=I2D(GetStoredInteger(HashCache,key,"Destr"))
call RemoveDestructable(Dstr)
call DestroyTrigger(trg)
call FlushStoredMission(HashCache,key)
set trg=null
set Dstr=null
set key=null
return false
endfunction
function DestructableRemoveTrg takes destructable dstr,real tm returns nothing
local trigger trg=CreateTrigger()
local string key=H2S(trg)
call StoreInteger(HashCache,key,"Destr",H2I(dstr))
call TriggerRegisterTimerEvent(trg,tm,false)
call TriggerAddCondition(trg,Condition(function DestructableRemoveCond))
set trg=null
set key=null
endfunction
function XuanYunUnit takes unit danwei,integer level returns nothing
local unit majia=CreateUnit(GetOwningPlayer(danwei),'hx01',GetUnitX(danwei),GetUnitY(danwei),0)
call UnitAddAbility(majia,'Az91')
call SetUnitAbilityLevel(majia,'Az91',level)
call IssueTargetOrder(majia,"thunderbolt",danwei)
call UnitApplyTimedLife(majia,'BHLF',0.5)
set majia=null
endfunction
function LieFengAction takes nothing returns nothing
local unit danwei=GetTriggerUnit()
local integer int=0
local location Loc=GetUnitLoc(danwei)
local location loc=GetSpellTargetLoc()
local unit mubiao=GetSpellTargetUnit()
local real angle
local real Tx=GetUnitX(danwei)
local real Ty=GetUnitY(danwei)
local real tx
local real ty
local group qun=CreateGroup()
local group Qun=CreateGroup()
local integer level=GetUnitAbilityLevel(danwei,'Az92')
if mubiao==null then
set loc=loc
else
set loc=GetUnitLoc(mubiao)
endif
set angle=AngleBetweenPoints(Loc,loc)
call RemoveLocation(loc)
call RemoveLocation(Loc)
loop
exitwhen int>20
set tx=Tx+int*60*CosBJ(angle)
set ty=Ty+int*60*SinBJ(angle)
call GroupEnumUnitsInRange(qun,tx,ty,250,null)
call GroupAddGroup(qun,Qun)
call GroupClear(qun)
call DestructableRemoveTrg(CreateDestructable('BRfs',tx,ty,GetRandomReal(0,360),0.5,GetRandomInt(0,2)),8)
call DestroyEffect(AddSpecialEffect("Abilities\\Spells\\Other\\Volcano\\VolcanoDeath.mdl",tx,ty))
set int=int+1
endloop
loop
set mubiao=FirstOfGroup(Qun)
exitwhen mubiao==null
if IsAttack(danwei,mubiao) then
call DamageTarget(danwei,mubiao,level*50)
call XuanYunUnit(mubiao,level)
endif
call GroupRemoveUnit(Qun,mubiao)
endloop
call DestroyGroup(qun)
call DestroyGroup(Qun)
set danwei=null
set loc=null
set Loc=null
set mubiao=null
set qun=null
set Qun=null
endfunction
function LieFengCond takes nothing returns boolean
if GetSpellAbilityId()=='Az92' then
call LieFengAction()
endif
return false
endfunction
function LieFengTrg takes nothing returns nothing
local trigger trg=CreateTrigger()
call TriggerRegisterAnyUnitEventBJ(trg,EVENT_PLAYER_UNIT_SPELL_EFFECT)
call TriggerAddCondition(trg,Condition(function LieFengCond))
set trg=null
endfunction
[/jass]
发表于 2010-9-4 16:52:27 | 显示全部楼层
没有效果是指没有“视觉效果”还是没有“眩晕”和“伤害”呢?
最好能发一下地图以方便测试…………
建议先在各个地方都加上call DisplayTextToForce然后看看触发运行到了哪里吧…………
回复

使用道具 举报

发表于 2010-9-4 17:04:42 | 显示全部楼层
用bjdebugmsg最好,没魔兽没法测试
回复

使用道具 举报

 楼主| 发表于 2010-9-4 18:37:26 | 显示全部楼层
没视觉效果,伤害 和 眩晕 时有时没有!
回复

使用道具 举报

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

本版积分规则

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

GMT+8, 2024-11-22 00:45 , Processed in 0.040330 second(s), 18 queries .

Powered by Discuz! X3.5

© 2001-2023 Discuz! Team.

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