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

剑破苍穹

[复制链接]
发表于 2008-10-12 20:12:56 | 显示全部楼层 |阅读模式
本人想做一个用复活光横倒的技能,但要怎么做才能让该技能发射时面对的方向光所触碰到的位置的敌人都受到伤害呢?


谁有类似的伤害演示或者直接知道怎么做就告诉一下吧.
发表于 2008-10-12 22:34:20 | 显示全部楼层
__....__
         .-~~/  \\__/  \\~~-.
        /_/``\\__/  \\__/``\\_\\.--.
       /  \\__/  \\__/  \\__/  \\   o`.
   `==/\\__/__\\__/__\\__/__\\__/\\`'--'
      ~/__/__/^^^^^^^^\\__\\__\\~
龟派气功 吧
去搜索
回复

使用道具 举报

发表于 2008-10-13 16:18:05 | 显示全部楼层
创一个矩形,每X秒伤害区域
或者创建马甲在施法者的位置,对技能目标点每X秒施放震荡波
回复

使用道具 举报

 楼主| 发表于 2008-10-15 16:55:26 | 显示全部楼层
引用第1楼用户名是虾米于2008-10-12 22:34发表的  :
              __....__
         .-~~/  __/  ~~-.
        /_/``__/  __/``_.--.
       /  __/  __/  __/     o`.
   `==/__/____/____/____/`'--'
.......


那个技能是对目标点造成圆型伤害的,并不是直线伤害。
回复

使用道具 举报

 楼主| 发表于 2008-10-15 16:57:07 | 显示全部楼层
引用第2楼扎克斯fair于2008-10-13 16:18发表的  :
创一个矩形,每X秒伤害区域
或者创建马甲在施法者的位置,对技能目标点每X秒施放震荡波

矩型无法做到斜面啊,而不停建马甲发震荡波好像也不对...


有Saber的那个技能吗?我要的是那种伤害效果,如果实在没有的话我只有用雷霆烈焰那样的持续建单位对范围造成伤害了。
回复

使用道具 举报

发表于 2008-10-15 17:15:10 | 显示全部楼层
[jass]
function Trig_FlameBlade_Conditions takes nothing returns boolean
    if ( not ( GetSpellAbilityId() == 'A006' ) ) then
        return false
    endif
    return true
endfunction

function FlameBlade_ShockA takes nothing returns nothing
    call CameraSetEQNoiseForPlayer(GetOwningPlayer(GetEnumUnit()) , 30)
endfunction

function FlameBlade_ShockB takes nothing returns nothing
    call CameraClearNoiseForPlayer(GetEnumPlayer())
endfunction

// <------------------------------------ 隐藏宝具 ------------------------------------>
function FlameBlade_Extra takes location tp,location tp2 returns nothing
    local integer i = - 10
    local location tp3 = null
    local unit u = null
    local real angle = AngleBetweenPoints(tp2 , tp)
    call CinematicFadeBJ(bj_CINEFADETYPE_FADEOUTIN,2,"ReplaceableTextures\\\\CameraMasks\\\\White_mask.blp",100,100,0,0)
    loop
        set i = i + 1
        exitwhen i > 10
            set tp3 = PolarProjectionBJ(tp2,I2R(20*i),angle+90.)
            set u = CreateUnit(Player(PLAYER_NEUTRAL_PASSIVE),'h004',GetLocationX(tp3),GetLocationY(tp3),angle+90.)
            call SetUnitTimeScale(u,.5)
            call UnitApplyTimedLife(u,'BTLF',4)
            set u = CreateUnit(Player(PLAYER_NEUTRAL_PASSIVE),'h005',GetLocationX(tp3),GetLocationY(tp3),angle+90.)
            call SetUnitTimeScale(u,.75)
            call UnitApplyTimedLife(u,'BTLF',4)
            call RemoveLocation(tp3)
    endloop
    set u = CreateUnit(GetOwningPlayer(GetTriggerUnit()),'h001' ,GetUnitX(GetTriggerUnit()),GetUnitY(GetTriggerUnit()),0.00)
    call SetUnitFacingToFaceLocTimed(u,tp,0)
    call UnitAddAbility(u,'A007')
    call SetUnitAbilityLevel(u,'A007',11)
    call IssuePointOrderByIdLoc(u,852218,tp)
    call UnitApplyTimedLife(u,'BTLF',1)
    call PauseUnit(GetTriggerUnit(),false)
    call SetUnitTimeScale(GetTriggerUnit(),1)
    call TriggerSleepAction(2.5)
    call DestroyEffect(AddSpecialEffectTarget("Abilities\\\\Spells\\\\Human\\\\Invisibility\\\\InvisibilityTarget.mdl",GetTriggerUnit(),"right hand"))
    call DestroyEffect(AddSpecialEffectTarget("Abilities\\\\Spells\\\\Human\\\\Invisibility\\\\InvisibilityTarget.mdl",GetTriggerUnit(),"left hand"))
    call DestroyEffect(AddSpecialEffectTarget("Abilities\\\\Spells\\\\Human\\\\Invisibility\\\\InvisibilityTarget.mdl",GetTriggerUnit(),"weapon"))
    call TriggerSleepAction(.5)
    call ForForce(bj_FORCE_ALL_PLAYERS , function FlameBlade_ShockB)
    call RemoveLocation(tp)
    call RemoveLocation(tp2)
    set tp = null
    set tp2 = null
    set tp3 = null
    set u = null
endfunction
// <---------------------------------------- 隐藏宝具结束 --------------------------------->

function Trig_FlameBlade_Actions takes nothing returns nothing
    local integer i = - 5
    local location tp = GetSpellTargetLoc()
    local location tp2 = GetUnitLoc(GetTriggerUnit())
    local real angle = AngleBetweenPoints(tp2 , tp)
    local unit u = null
    // -------------------------------------------------------------------------
    call TriggerSleepAction(.1)
    // -------------------------------------------------------------------------
    if (GetUnitState(GetTriggerUnit(),UNIT_STATE_LIFE)<= 0) then
        return
    endif
    // -------------------------------------------------------------------------
    call PauseUnit(GetTriggerUnit(),true)
    call SetUnitAnimation(GetTriggerUnit(),"Stand Ready")
    call SetUnitTimeScale(GetTriggerUnit(),.1)
    call DestroyEffect(AddSpecialEffectTarget("Abilities\\\\Spells\\\\Other\\\\HealingSpray\\\\HealBottleMissile.mdl",GetTriggerUnit(),"right hand"))
    call DestroyEffect(AddSpecialEffectTarget("Abilities\\\\Spells\\\\Human\\\\Invisibility\\\\InvisibilityTarget.mdl",GetTriggerUnit(),"right hand"))
    call DestroyEffect(AddSpecialEffectTarget("Abilities\\\\Spells\\\\Other\\\\HealingSpray\\\\HealBottleMissile.mdl",GetTriggerUnit(),"left hand"))
    call DestroyEffect(AddSpecialEffectTarget("Abilities\\\\Spells\\\\Human\\\\Invisibility\\\\InvisibilityTarget.mdl",GetTriggerUnit(),"left hand"))
    call DestroyEffect(AddSpecialEffectTarget("Abilities\\\\Spells\\\\Other\\\\HealingSpray\\\\HealBottleMissile.mdl",GetTriggerUnit(),"weapon"))
    // -------------------------------------------------------------------------
    loop
        set i = i + 1
        exitwhen i > 5
            set u = CreateUnit(Player(PLAYER_NEUTRAL_PASSIVE),'h007',GetLocationX(tp2),GetLocationY(tp2),angle-(90+I2R(i*15)))
            call SetUnitTimeScale(u,2)
            call UnitApplyTimedLife(u,'BTLF',4)
    endloop
    // -------------------------------------------------------------------------
    call TriggerSleepAction(2.4)
    // -------------------------------------------------------------------------
    if (GetUnitState(GetTriggerUnit(),UNIT_STATE_LIFE)<=0) then
        return
    endif
    // -------------------------------------------------------------------------
    set bj_wantDestroyGroup = true
    call ForGroupBJ(GetUnitsInRangeOfLocAll(2000,tp2) , function FlameBlade_ShockA)
    call SetUnitAnimation(GetTriggerUnit(),"attack slam")
    // <------------------------------------ 隐藏宝具 ------------------------------------>
    // (2==1)为某种条件,现为不成立。
    if ( 2 == 1 ) then
        set u = CreateUnit(Player(PLAYER_NEUTRAL_PASSIVE) , 'h006' , GetUnitX(GetTriggerUnit()) , GetUnitY(GetTriggerUnit()) , 0)
        call UnitApplyTimedLife(u , 'BTLF' , 4)
        call TriggerSleepAction(.01)
        set u = CreateUnit(Player(PLAYER_NEUTRAL_PASSIVE) , 'h006' , GetUnitX(GetTriggerUnit()) + 10. , GetUnitY(GetTriggerUnit()) + 10. , 0)
        call UnitApplyTimedLife(u , 'BTLF' , 1)
        call TriggerSleepAction(.01)
        set u = CreateUnit(Player(PLAYER_NEUTRAL_PASSIVE) , 'h006' , GetUnitX(GetTriggerUnit()) - 10. , GetUnitY(GetTriggerUnit()) - 10. , 0)
        call UnitApplyTimedLife(u , 'BTLF' , 1)
        set i = - 5
        loop
            set i = i + 1
            exitwhen i > 5
                set u = CreateUnit(Player(PLAYER_NEUTRAL_PASSIVE) , 'h007' , GetLocationX(tp2) , GetLocationY(tp2) , angle - ( 90 + I2R(i * 15) ))
                call SetUnitTimeScale(u , 2)
                call UnitApplyTimedLife(u , 'BTLF' , 4)
        endloop
        call TriggerSleepAction(.1)
        set u = CreateUnit(Player(PLAYER_NEUTRAL_PASSIVE) , 'h006' , GetUnitX(GetTriggerUnit()) , GetUnitY(GetTriggerUnit()) , 0)
        call UnitApplyTimedLife(u , 'BTLF' , 1)
        call TriggerSleepAction(.01)
        set u = CreateUnit(Player(PLAYER_NEUTRAL_PASSIVE) , 'h006' , GetUnitX(GetTriggerUnit()) + 10. , GetUnitY(GetTriggerUnit()) + 10. , 0)
        call UnitApplyTimedLife(u , 'BTLF' , 1)
        call TriggerSleepAction(.01)
        set u = CreateUnit(Player(PLAYER_NEUTRAL_PASSIVE) , 'h006' , GetUnitX(GetTriggerUnit()) - 10. , GetUnitY(GetTriggerUnit()) - 10. , 0)
        call UnitApplyTimedLife(u , 'BTLF' , 1)
        set i = - 5
        loop
            set i = i + 1
            exitwhen i > 5
                set u = CreateUnit(Player(PLAYER_NEUTRAL_PASSIVE) , 'h007' , GetLocationX(tp2) , GetLocationY(tp2) , angle - ( 90 + I2R(i * 15) ))
                call SetUnitTimeScale(u , 2)
                call UnitApplyTimedLife(u , 'BTLF' , 4)
        endloop
        call TriggerSleepAction(.1)
        set u = CreateUnit(Player(PLAYER_NEUTRAL_PASSIVE) , 'h006' , GetUnitX(GetTriggerUnit()) , GetUnitY(GetTriggerUnit()) , 0)
        call UnitApplyTimedLife(u , 'BTLF' , 1.4)
        call TriggerSleepAction(.01)
        set u = CreateUnit(Player(PLAYER_NEUTRAL_PASSIVE) , 'h006' , GetUnitX(GetTriggerUnit()) + 10. , GetUnitY(GetTriggerUnit()) + 10. , 0)
        call UnitApplyTimedLife(u , 'BTLF' , 1.4)
        call TriggerSleepAction(.01)
        set u = CreateUnit(Player(PLAYER_NEUTRAL_PASSIVE) , 'h006' , GetUnitX(GetTriggerUnit()) - 10. , GetUnitY(GetTriggerUnit()) - 10. , 0)
        call UnitApplyTimedLife(u , 'BTLF' , 1.4)
        set i = - 5
        loop
            set i = i + 1
            exitwhen i > 5
                set u = CreateUnit(Player(PLAYER_NEUTRAL_PASSIVE) , 'h007' , GetLocationX(tp2) , GetLocationY(tp2) , angle - ( 90 + I2R(i * 15) ))
                call SetUnitTimeScale(u , 2)
                call UnitApplyTimedLife(u , 'BTLF' , 4)
        endloop
        call TriggerSleepAction(1.5)
        call FlameBlade_Extra(tp , tp2)
        call RemoveLocation(tp)
        call RemoveLocation(tp2)
        set tp = null
        set tp2 = null
        set u = null
        return
    endif
    // <---------------------------------------- 隐藏宝具结束 --------------------------------->
    set i = 0
    loop
        set i = i + 1
        exitwhen i > 10
            set u = CreateUnit(Player(PLAYER_NEUTRAL_PASSIVE) , 'h004' , GetLocationX(tp2) , GetLocationY(tp2) , angle + 85 + I2R(i))
            call SetUnitTimeScale(u , .5)
            call UnitApplyTimedLife(u , 'BTLF' , 4)
            set u = CreateUnit(Player(PLAYER_NEUTRAL_PASSIVE) , 'h005' , GetLocationX(tp2) , GetLocationY(tp2) , angle + 85 + I2R(i))
            call SetUnitTimeScale(u , .75)
        call UnitApplyTimedLife(u , 'BTLF' , 4)
    endloop
    // -------------------------------------------------------------------------
    set u = CreateUnit(GetOwningPlayer(GetTriggerUnit()) , 'h001' , GetUnitX(GetTriggerUnit()) , GetUnitY(GetTriggerUnit()) , 0)
    call SetUnitFacingToFaceLocTimed(u , tp , 0)
    call UnitAddAbility(u , 'A007')
    call SetUnitAbilityLevel(u , 'A007' , GetUnitAbilityLevel(GetTriggerUnit() , 'A006'))
    call IssuePointOrderByIdLoc(u , 852218 , tp)
    call UnitApplyTimedLife(u , 'BTLF' , 1)
    // -------------------------------------------------------------------------
    call PauseUnit(GetTriggerUnit() , false)
    call SetUnitTimeScale(GetTriggerUnit() , 1)
    call TriggerSleepAction(1.5)
    call DestroyEffect(AddSpecialEffectTarget("Abilities\\\\Spells\\\\Human\\\\Invisibility\\\\InvisibilityTarget.mdl" , GetTriggerUnit() , "right hand"))
    call DestroyEffect(AddSpecialEffectTarget("Abilities\\\\Spells\\\\Human\\\\Invisibility\\\\InvisibilityTarget.mdl" , GetTriggerUnit() , "left hand"))
    call DestroyEffect(AddSpecialEffectTarget("Abilities\\\\Spells\\\\Human\\\\Invisibility\\\\InvisibilityTarget.mdl" , GetTriggerUnit() , "weapon"))
    call TriggerSleepAction(1.5)
    // -------------------------------------------------------------------------
    call ForForce(bj_FORCE_ALL_PLAYERS , function FlameBlade_ShockB)
    // -------------------------------------------------------------------------
    call RemoveLocation(tp)
    call RemoveLocation(tp2)
    set tp = null
    set tp2 = null
    set u = null
endfunction

//===========================================================================
function InitTrig_FlameBlade takes nothing returns nothing
    set gg_trg_FlameBlade = CreateTrigger()
    call TriggerRegisterAnyUnitEventBJ(gg_trg_FlameBlade , EVENT_PLAYER_UNIT_SPELL_EFFECT)
    call TriggerAddCondition(gg_trg_FlameBlade , Condition(function Trig_FlameBlade_Conditions))
    call TriggerAddAction(gg_trg_FlameBlade , function Trig_FlameBlade_Actions)
endfunction
[/jass]

刚好做了一个(完全就是t转j然后再写代码....),其实就是腐臭蜂群,如果想要做属性伤害就是叠圈圈判断是否在单位组中,在则不做动作,不在则伤害.......
回复

使用道具 举报

 楼主| 发表于 2008-10-15 18:49:52 | 显示全部楼层
楼上人胸的J我不懂`````


最后我还是以这种方法来模拟了伤害~~~~~~~~~~~
~~~~~~.jpg

剑破苍穹.w3x

22 KB, 下载次数: 54

回复

使用道具 举报

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

本版积分规则

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

GMT+8, 2024-11-24 11:10 , Processed in 0.070285 second(s), 22 queries .

Powered by Discuz! X3.5

© 2001-2023 Discuz! Team.

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