mugen吧 关注:79,035贴子:1,494,003
  • 38回复贴,共1
如题是ai问题,问题是:怎么让ai跳跃以及让他接奈奈落什么的空中发动的技能,我这里尝试总是失败,最好是能给我一个模板,可能是我哪里出错了。


IP属地:江西1楼2019-05-16 17:47回复
    建议你看看这个
    https://tieba.baidu.com/p/6130466618


    2楼2019-05-16 19:06
    收起回复
      ;---------------------------------------------------------------------------
      ; Jump Start
      [Statedef 40]
      type = S
      physics = S
      anim = 40
      ctrl = 0
      sprpriority = 1
      [State 40, 2]
      type = selfstate
      trigger1 = command != "a"
      trigger1 = command = "holdup"
      value = 0
      ctrl = 1
      [State 40, 4]
      type = VelSet
      trigger1 = 1
      x = (command = "holdfwd")*const(velocity.walk.fwd.x)
      y = const(velocity.jump.y)
      [State 40, 6]
      type = ChangeState
      trigger1 = time = 2
      value = 50
      ctrl = 1
      复制来的,自己想办法改改


      3楼2019-05-16 20:28
      收起回复
        我 乱写一个.JPG
        [state 跳]
        type = changestate
        value = 跳
        通用条件省略
        triggerall = ...
        trigger1 = 你想要起跳的情况
        [state 打]
        value = 打
        通用条件省略
        triggerall = ...
        trigger1 = ctrl
        trigger1 = (enemynear,pos x - pos x)*facing <= 出招距离
        trigger1 = abs(enemynear,pos y - pos y) <= 出招高度


        IP属地:黑龙江4楼2019-05-16 22:10
        回复
          我这边有一个白雪氏的ai教程,如果你有兴趣的话我会网盘发给你,不过今天不行了,明天吧,前提是你对一些代码有了一定的基础的了解才能看的下去。


          来自Android客户端5楼2019-05-16 22:57
          回复
            要跳干嘛,全程滑步ab闪


            IP属地:四川来自Android客户端6楼2019-05-17 01:56
            回复
              感谢各位大佬,成功了


              IP属地:江西7楼2019-05-17 17:56
              回复
                另外大佬们,怎么限制一个招数的使用次数?


                IP属地:江西8楼2019-05-17 18:34
                收起回复
                  ;奈奈落
                  [Statedef 330]
                  type = A
                  movetype = A
                  physics = A
                  poweradd = 0
                  ctrl = 0
                  anim = 330
                  sprpriority = 3
                  [State 610, 音を鳴らす]
                  type = PlaySnd
                  trigger1 = AnimElem = 2
                  value = 10, 1
                  [State 200, 音を鳴らす]
                  type = PlaySnd
                  trigger1 = AnimElem = 2
                  value = 0, 1
                  [State 610, ヒット定義]
                  type = HitDef
                  trigger1 = animelem = 2
                  attr = A, NA
                  damage = 54
                  guardflag = H
                  priority = 4
                  pausetime = 7,16
                  sparkno = s10001
                  guard.sparkno = s4110
                  sparkxy = -10,-80
                  hitsound = s1,1
                  guardsound = s2,0
                  animtype = Hard
                  ground.type = Low
                  ground.slidetime = 23
                  ground.hittime = 24
                  ground.velocity = -6
                  air.type = Low
                  air.velocity = -5,15
                  air.hittime = 12
                  air.fall = 1
                  envshake.ampl = 5
                  envshake.freq = 90
                  envshake.time = 15
                  fall.recover = 0
                  ground.cornerpush.veloff = -6
                  air.cornerpush.veloff = -6
                  fall.envshake.time = 12
                  fall.envshake.ampl = 4
                  fall.envshake.freq = 90


                  IP属地:江西9楼2019-05-17 21:22
                  收起回复





                    IP属地:江西10楼2019-05-17 21:25
                    回复
                      你再-3定义一下变量
                      [State 0, VarSet]
                      type = VarAdd
                      triggerall = time = 1
                      trigger1 = stateno = 301
                      trigger2 = stateno = 303
                      v = 32 ;fv = 10
                      value = 1 ;就是在如果放出303或者301状态变量32增加1
                      ;ignorehitpause =
                      ;persistent =
                      [State 0, VarSet]
                      type = VarSet
                      trigger1 = statetype = L
                      trigger2 = movetype = H
                      trigger3 = EnemyNear(floor(fvar(37))),movetype != H ;这一块代码(floor(fvar(37)))可以无视掉或者删除掉
                      trigger4 = EnemyNear(floor(fvar(37))),moveguarded
                      v = 32 ;fv = 10
                      value = 0 ;自身倒地状态或者自身受击状态或者敌方非受击状态或者敌方防御的时候,
                      ;变量32则清零,意思就是连段结束或者强制断连的情况下将变量清零,我反正是这么写
                      ;的,具体看自己自身情况而定
                      ;ignorehitpause =
                      ;persistent =
                      然后在奈落落的ai起手上写var(32)<4,就是这招只打3次


                      11楼2019-05-17 21:35
                      收起回复