找回密码
 点一下
查看: 2561|回复: 6

魔兽地图编辑 真三赵云的长枪突刺

[复制链接]
发表于 2010-9-17 12:08:20 | 显示全部楼层 |阅读模式
[pre]真三赵云的长枪突刺  有两个触发  想改其击退距离  代码看不懂  我改了一下那个显眼的50→5000后,没效果,囧,   请问怎么改呢?

pike butt
//TESH.scrollpos=0
//TESH.alwaysfold=0
function Trig_Pike_Butt_Conditions takes nothing returns boolean
return ((GetSpellAbilityId()=='A06K'))and((GetUnitTypeId(GetSpellTargetUnit())!='n006'))
endfunction
function Trig_Pike_Butt_Actions takes nothing returns nothing
set udg_PikeButt_Index=0
set udg_PikeButt_Caster=GetSpellAbilityUnit()
set udg_PikeButt_Target=GetSpellTargetUnit()
set udg_PikeButt_P01=GetUnitLoc(udg_PikeButt_Caster)
set udg_PikeButt_P02=GetUnitLoc(udg_PikeButt_Target)
set udg_PikeButt_PtoP=AngleBetweenPoints(udg_PikeButt_P01,udg_PikeButt_P02)
call RemoveLocation(udg_PikeButt_P01)
call RemoveLocation(udg_PikeButt_P02)
call EnableTrigger(gg_trg_Pike_Butt_Effect)
endfunction

//===========================================================================
function InitTrig_Pike_Butt takes nothing returns nothing
set gg_trg_Pike_Butt=CreateTrigger()
call TriggerRegisterAnyUnitEventBJ(gg_trg_Pike_Butt,EVENT_PLAYER_UNIT_SPELL_EFFECT)
call TriggerAddCondition(gg_trg_Pike_Butt,Condition(function Trig_Pike_Butt_Conditions))
call TriggerAddAction(gg_trg_Pike_Butt,function Trig_Pike_Butt_Actions)
endfunction

pike butt effect
//TESH.scrollpos=8
//TESH.alwaysfold=0
function Trig_Pike_Butt_Effect_Func008Func001A takes nothing returns nothing
call KillDestructable(GetEnumDestructable())
endfunction
function Trig_Pike_Butt_Effect_Func008C takes nothing returns boolean
return ((DistanceBetweenPoints(udg_PikeButt_P02,udg_PikeButt_P03)<5.00))
endfunction
function Trig_Pike_Butt_Effect_Func009C takes nothing returns boolean
return ((udg_PikeButt_Index>=17))
endfunction
function Trig_Pike_Butt_Effect_Actions takes nothing returns nothing
set udg_PikeButt_Index=(udg_PikeButt_Index+1)
set udg_PikeButt_P01=GetUnitLoc(udg_PikeButt_Target)
set udg_PikeButt_P02=PolarProjectionBJ(udg_PikeButt_P01,50.00,udg_PikeButt_PtoP)
call AddSpecialEffectTargetUnitBJ("origin",udg_PikeButt_Target,"Abilities\\Weapons\\AncientProtectorMissile\\AncientProtectorMissile.mdl")
call DestroyEffect(bj_lastCreatedEffect)
call SetUnitPositionLocFacingBJ(udg_PikeButt_Target,udg_PikeButt_P02,GetUnitFacing(udg_PikeButt_Target))
set udg_PikeButt_P03=GetUnitLoc(udg_PikeButt_Target)
if (Trig_Pike_Butt_Effect_Func008C()) then
call EnumDestructablesInCircleBJ(192.00,udg_PikeButt_P02,function Trig_Pike_Butt_Effect_Func008Func001A)
else
call SetUnitPositionLoc(udg_PikeButt_Target,udg_PikeButt_P01)
call DisableTrigger(GetTriggeringTrigger())
endif
if (Trig_Pike_Butt_Effect_Func009C()) then
call DisableTrigger(GetTriggeringTrigger())
endif
call RemoveLocation(udg_PikeButt_P01)
call RemoveLocation(udg_PikeButt_P02)
call RemoveLocation(udg_PikeButt_P03)
endfunction

//===========================================================================
function InitTrig_Pike_Butt_Effect takes nothing returns nothing
set gg_trg_Pike_Butt_Effect=CreateTrigger()
call DisableTrigger(gg_trg_Pike_Butt_Effect)
call TriggerRegisterTimerEventPeriodic(gg_trg_Pike_Butt_Effect,0.05)
call TriggerAddAction(gg_trg_Pike_Butt_Effect,function Trig_Pike_Butt_Effect_Actions)
endfunction
[/pre]
发表于 2010-9-17 13:42:15 | 显示全部楼层
不如用T做。
不知道效果所以不做评论。
回复

使用道具 举报

发表于 2010-9-17 13:59:46 | 显示全部楼层
辨色,加亮再看。
就是那个50.00 - -...= =

[jass]真三赵云的长枪突刺&#160;&#160;有两个触发&#160;&#160;想改其击退距离&#160;&#160;代码看不懂&#160;&#160;我改了一下那个显眼的50→5000后,没效果,囧,&#160;&#160; 请问怎么改呢?

pike butt
//TESH.scrollpos=0
//TESH.alwaysfold=0
function Trig_Pike_Butt_Conditions takes nothing returns boolean
return ((GetSpellAbilityId()=='A06K'))and((GetUnitTypeId(GetSpellTargetUnit())!='n006'))
endfunction
function Trig_Pike_Butt_Actions takes nothing returns nothing
set udg_PikeButt_Index=0
set udg_PikeButt_Caster=GetSpellAbilityUnit()
set udg_PikeButt_Target=GetSpellTargetUnit()
set udg_PikeButt_P01=GetUnitLoc(udg_PikeButt_Caster)
set udg_PikeButt_P02=GetUnitLoc(udg_PikeButt_Target)
set udg_PikeButt_PtoP=AngleBetweenPoints(udg_PikeButt_P01,udg_PikeButt_P02)
call RemoveLocation(udg_PikeButt_P01)
call RemoveLocation(udg_PikeButt_P02)
call EnableTrigger(gg_trg_Pike_Butt_Effect)
endfunction

//===========================================================================
function InitTrig_Pike_Butt takes nothing returns nothing
set gg_trg_Pike_Butt=CreateTrigger()
call TriggerRegisterAnyUnitEventBJ(gg_trg_Pike_Butt,EVENT_PLAYER_UNIT_SPELL_EFFECT)
call TriggerAddCondition(gg_trg_Pike_Butt,Condition(function Trig_Pike_Butt_Conditions))
call TriggerAddAction(gg_trg_Pike_Butt,function Trig_Pike_Butt_Actions)
endfunction

pike butt effect
//TESH.scrollpos=8
//TESH.alwaysfold=0
function Trig_Pike_Butt_Effect_Func008Func001A takes nothing returns nothing
call KillDestructable(GetEnumDestructable())
endfunction
function Trig_Pike_Butt_Effect_Func008C takes nothing returns boolean
return ((DistanceBetweenPoints(udg_PikeButt_P02,udg_PikeButt_P03)<5.00))
endfunction
function Trig_Pike_Butt_Effect_Func009C takes nothing returns boolean
return ((udg_PikeButt_Index>=17))
endfunction
function Trig_Pike_Butt_Effect_Actions takes nothing returns nothing
set udg_PikeButt_Index=(udg_PikeButt_Index+1)
set udg_PikeButt_P01=GetUnitLoc(udg_PikeButt_Target)
set udg_PikeButt_P02=PolarProjectionBJ(udg_PikeButt_P01,50.00,udg_PikeButt_PtoP)
call AddSpecialEffectTargetUnitBJ("origin",udg_PikeButt_Target,"Abilities\\\\Weapons\\\\AncientProtectorMissile\\\\AncientProtectorMissile.mdl")
call DestroyEffect(bj_lastCreatedEffect)
call SetUnitPositionLocFacingBJ(udg_PikeButt_Target,udg_PikeButt_P02,GetUnitFacing(udg_PikeButt_Target))
set udg_PikeButt_P03=GetUnitLoc(udg_PikeButt_Target)
if (Trig_Pike_Butt_Effect_Func008C()) then
call EnumDestructablesInCircleBJ(192.00,udg_PikeButt_P02,function Trig_Pike_Butt_Effect_Func008Func001A)
else
call SetUnitPositionLoc(udg_PikeButt_Target,udg_PikeButt_P01)
call DisableTrigger(GetTriggeringTrigger())
endif
if (Trig_Pike_Butt_Effect_Func009C()) then
call DisableTrigger(GetTriggeringTrigger())
endif
call RemoveLocation(udg_PikeButt_P01)
call RemoveLocation(udg_PikeButt_P02)
call RemoveLocation(udg_PikeButt_P03)
endfunction

//===========================================================================
function InitTrig_Pike_Butt_Effect takes nothing returns nothing
set gg_trg_Pike_Butt_Effect=CreateTrigger()
call DisableTrigger(gg_trg_Pike_Butt_Effect)
call TriggerRegisterTimerEventPeriodic(gg_trg_Pike_Butt_Effect,0.05)
call TriggerAddAction(gg_trg_Pike_Butt_Effect,function Trig_Pike_Butt_Effect_Actions)
endfunction
[/jass]
回复

使用道具 举报

 楼主| 发表于 2010-9-17 15:03:33 | 显示全部楼层
50我改了  囧   还是没效果  难道改多了   ?   
回复

使用道具 举报

发表于 2010-9-20 17:06:30 | 显示全部楼层
怎么变色加亮的??
回复

使用道具 举报

发表于 2010-9-25 14:12:32 | 显示全部楼层
50距离*17次数(udg_PikeButt_Index)=850
回复

使用道具 举报

发表于 2010-10-4 12:11:51 | 显示全部楼层
这个移动是说

每0.05秒移动50码,共移动17次,单位位移点和预计点偏移超过5码则中止(用于碰撞停止),每次移动选取192码范围可破坏物后杀死(推树)。

没有障碍最终完成技能
总距离 17*50=850 总耗时 0.05*17=0.85秒
回复

使用道具 举报

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

本版积分规则

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

GMT+8, 2024-5-3 22:13 , Processed in 0.077722 second(s), 19 queries .

Powered by Discuz! X3.5

© 2001-2023 Discuz! Team.

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