找回密码
 点一下
楼主: akasha

创建了一群 单位,对他们发动移动命令阵型的问题

[复制链接]
发表于 2008-9-12 20:10:46 | 显示全部楼层
因为冰环的特效也是一个个单位,也会被选取到。

但在实际应用中,没人会这么无聊弄个0CD的技能吧?
回复

使用道具 举报

发表于 2008-9-12 20:13:39 | 显示全部楼层
这两个人……………………………………………………………………………………………………………………………………从WOW8一起扭到GA来了…………………………………………………………………………………………………………………………………………………………………………………………
回复

使用道具 举报

发表于 2008-9-12 20:16:45 | 显示全部楼层
还是做个图吧,其实就是上面的代码凑起来

xxxxxx.w3x

23 KB, 下载次数: 14

回复

使用道具 举报

发表于 2008-9-12 20:23:28 | 显示全部楼层
我发现选取单位的范围给得很大的时候(比如我刚刚测试会造成多次伤害的时候改成300了)那条语句会很卡,但是20、50这么小不会很卡
回复

使用道具 举报

发表于 2008-9-12 20:26:07 | 显示全部楼层
太神奇了
回复

使用道具 举报

发表于 2008-9-12 20:29:23 | 显示全部楼层
我改成了20 call UnitDamageTarget(GetUnit(s, "Source"), u, 20, true, false, ATTACK_TYPE_MELEE, DAMAGE_TYPE_DIVINE, WEAPON_TYPE_WHOKNOWS)结果农民要掉30点血

太神奇了
回复

使用道具 举报

发表于 2008-9-12 20:30:39 | 显示全部楼层
普通攻击对中甲150%伤害....................
回复

使用道具 举报

发表于 2008-9-12 20:31:43 | 显示全部楼层
好神奇啊
为什么您写的不会造成多次伤害啊
回复

使用道具 举报

发表于 2008-9-12 20:32:14 | 显示全部楼层
好烦啊啊 啊

您为什么那么强大啊啊啊啊啊啊啊啊

为什么我的要造成多次伤害啊啊啊啊啊啊啊
回复

使用道具 举报

发表于 2008-9-12 20:34:17 | 显示全部楼层
我要死了我要死了我要死了
天赐我一双慧眼吧,到底是哪里不对啊
回复

使用道具 举报

发表于 2008-9-12 20:36:16 | 显示全部楼层
不要用全局变量传递参数

你的写得太乱,我没仔细看
回复

使用道具 举报

发表于 2008-9-12 20:39:03 | 显示全部楼层
恶灵退散……………………………………………………………………………………………………………………………………………………………………
回复

使用道具 举报

发表于 2008-9-12 20:47:21 | 显示全部楼层
我明明有改成你们说的啊
回复

使用道具 举报

发表于 2008-9-12 20:51:17 | 显示全部楼层
我发现如果不用CDamage(),直接像您那样写貌似不会造成多次伤害
[jass]
function CDamage takes unit u1,unit u2,real DM returns nothing
    local real X = GetUnitX(u2)
    local real Y = GetUnitY(u2)
    call UnitDamageTarget( u1, u2, DM, false, false, ATTACK_TYPE_NORMAL, DAMAGE_TYPE_FIRE, WEAPON_TYPE_WHOKNOWS )
    call CreateTextTagLocBJ( I2S(R2I(DM)), Location(X, Y), 0, 10, 50.00, 75.00, 100, 0 )
    call SetTextTagVelocityBJ( GetLastCreatedTextTag(), 64, 90 )
    call SetTextTagPermanent( GetLastCreatedTextTag(), false )
    call SetTextTagLifespan( GetLastCreatedTextTag(), 3.00 )
endfunction
[/jass]
回复

使用道具 举报

发表于 2008-9-12 20:56:32 | 显示全部楼层
不,其实不是LS那样
就是我不行
我不行
我不行
我不行
我不行
我不行
我不行
我不行
我不行
回复

使用道具 举报

发表于 2008-9-12 21:12:04 | 显示全部楼层
我真的不行了,求求你帮我看看吧!!!
按照boy大人您的意思,全局函数没有了
[jass]
function Trig_BSXX2_Conditions takes nothing returns boolean
      if ( not ( GetSpellAbilityId() == 'A03R' ) ) then
            return false
      endif
      return true
endfunction

function JHFilter takes nothing returns boolean
    local string s = H2S(GetExpiredTimer() )
    local location p
    local unit u = GetUnit(s, "Source")
    local group g = GetGroup(s,"damaged")
    local real DM =   (GetUnitAbilityLevel(u, 'A03R')*15+ 0.7*(GetUnitUserData(u)))
    if(IsUnitInGroup(GetFilterUnit(), g) == false and IsUnitEnemy(GetFilterUnit(),GetOwningPlayer(u))and   GetUnitState(GetFilterUnit(),UNIT_STATE_LIFE)>1 and IsUnitType(GetFilterUnit(),UNIT_TYPE_STRUCTURE)==false ) then
    call GroupAddUnit(g, GetFilterUnit())
    call CDamage(u,GetFilterUnit(),DM)
     set p = Location(GetUnitX(GetFilterUnit()),GetUnitY(GetFilterUnit()))
    call CreateNUnitsAtLocFacingLocBJ( 1, 'e005', GetOwningPlayer(u), p,p)
    call UnitAddAbility( GetLastCreatedUnit(), 'A03Q' )
    call IssueTargetOrder( GetLastCreatedUnit(), "ensnare", GetFilterUnit() )
    call UnitApplyTimedLifeBJ( 4.00, 'BTLF', GetLastCreatedUnit() )         
    call RemoveLocation(p)
         set p = null
    endif
      set u = null
      set g = null
    return false
endfunction
function IceAC takes nothing returns nothing
         local string s = H2S(GetExpiredTimer() )
         local unit u = GetUnit(s,"Source")
         local location p
         local real DM =   (GetUnitAbilityLevel(u, 'A03R')*15+ 0.7*(GetUnitUserData(u)))
         local boolexpr lCheck
         local unit dmg
         local real angle = GetUnitFacing(GetEnumUnit())
         local real tempX = GetUnitX( GetEnumUnit() ) + 15 * Cos( (3.14159/180) * angle     )
         local real tempY = GetUnitY( GetEnumUnit() ) + 15 * Sin( (3.14159/180) * angle     )
         local group lGroup2 = GetGroup(s,"damaged")
     local group lGroup = CreateGroup()
         set lCheck=Condition(function JHFilter)
         call GroupEnumUnitsInRange(lGroup,tempX,tempY,50,lCheck)
         set lGroup = null
         call DestroyGroup(lGroup)
         call SetUnitX( GetEnumUnit(), tempX )  
         call SetUnitY( GetEnumUnit(), tempY )  
endfunction
function IceTimer takes nothing returns boolean
         local timer t =  GetExpiredTimer()
         local integer i
         local string s = H2S(t)
         local group g = GetGroup(s, "CasterGroup")
         local unit u = GetUnit(s,"source")
         set i = GetStoredInteger(CacheValue(),H2S(t),"cishu") + 1
         call StoreInteger( CacheValue(), H2S(t), "cishu", i )
         if i > 25 then
                  call DestroyGroup(g)
                  call FlushStoredMission( CacheValue(), HandleName(t) )
                  call DestroyTimer(t)
         else
                  call ForGroup(g, function IceAC)
         endif
         set t=null
         return false
endfunction
function IceSpell takes nothing returns nothing
         local unit source = GetTriggerUnit()
         local group g = CreateGroup()
         local group g2 = CreateGroup()
         local unit u
         local real x = GetUnitX(source)
         local real y = GetUnitY(source)
         local integer i = 0
         local integer num = 48
         local timer t = CreateTimer()
         local string s = H2S(t)
         loop
                  exitwhen i > num
                  set u = CreateUnit(GetOwningPlayer(source),'e00C', x, y, 360*i/num)
                  call UnitApplyTimedLife( u, 'BTLF', 0.60 )
                  call GroupAddUnit(g, u)
                  set i = i + 1
         endloop
         call SetHandle(s, "CasterGroup",g)
         call SetHandle(s, "Source", source)
         call SetHandle(s,"damaged",g2)
         call StoreInteger( CacheValue(), H2S(t), "cishu", 0 )
         //call TriggerRegisterTimerEvent(t, 0.03, true)
         //call TriggerAddCondition(t, Condition(function IceTimer))
         call TimerStart(t, .03 , true, function IceTimer )
         set t = null
         set u = null
         set source = null
         set g = null
endfunction

//===========================================================================
function InitTrig_BSXX2 takes nothing returns nothing
      set gg_trg_BSXX2 = CreateTrigger(   )
      call TriggerRegisterAnyUnitEventBJ( gg_trg_BSXX2, EVENT_PLAYER_UNIT_SPELL_EFFECT )
      call TriggerAddCondition( gg_trg_BSXX2, Condition( function Trig_BSXX2_Conditions ) )
      call TriggerAddAction( gg_trg_BSXX2, function IceSpell )
endfunction
[/jass]
回复

使用道具 举报

发表于 2008-9-12 21:29:23 | 显示全部楼层
如果觉得我写的没错,那就仔细看明白吧


累了,等下一个好心人帮你吧
回复

使用道具 举报

 楼主| 发表于 2008-9-12 21:30:40 | 显示全部楼层
不要了啦。。。
您就是那位好心人!
帮帮我吧!
回复

使用道具 举报

发表于 2008-9-12 21:35:00 | 显示全部楼层
演示都给你了,你还想我怎么样.........
回复

使用道具 举报

 楼主| 发表于 2008-9-12 21:40:31 | 显示全部楼层
不是啊
为什么我那个有问题啊啊啊啊啊
头大头大,你知道吗,觉得自己没问题结果却有问题是多么痛苦的事
回复

使用道具 举报

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

本版积分规则

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

GMT+8, 2024-7-21 06:30 , Processed in 0.045641 second(s), 19 queries .

Powered by Discuz! X3.5

© 2001-2023 Discuz! Team.

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