mugen吧 关注:79,101贴子:1,494,236
  • 27回复贴,共1

请教诸位大神一个问题

只看楼主收藏回复

我用下面几段代码本意是想当人物的life掉到十分之一以下时life和power可以缓慢恢复直至满值……结果因为trigger1 = Life <= (lifemax/10)在不断判断所以只要life大于十分之一就停止了……有什么办法使Life <=(lifemax/10)这个条件只要成立一次就算始终成立吗?
[state 0]
type = lifeadd
triggerall = alive
trigger1 = Life <= (lifemax/10)
trigger1 = GameTime%10 = 1
ignorehitpause = 1
value = 1 [state 0]
type = poweradd
triggerall = alive
trigger1 = Life <= (lifemax/10)
trigger1 = GameTime%10 = 1
ignorehitpause = 1
value = 1
[state -3,5]
type = lifeadd
triggerall = alive
trigger1 = Life <= (lifemax/10)
trigger1 = GameTime%10 = 1
ignorehitpause = 1
value = 1 [state -3,5]
type = poweradd
triggerall = alive
trigger1 = Life <= (lifemax/10)
trigger1 = GameTime%10 = 1
ignorehitpause = 1
value = 1


1楼2013-01-22 14:02回复
    @Eagrose 螺丝大神


    2楼2013-01-22 14:23
    收起回复
      变量太浪费的,要是我就用explod


      IP属地:上海5楼2013-01-22 15:31
      收起回复
        血量低于十分之一时召唤一个没有图片的explod,给它一个id,然后回血条件用numexplod(XXX),XXX就填你给的ID


        IP属地:上海6楼2013-01-22 16:35
        回复
          6楼GM所说的explod方法就可以了。
          简单说,思路就是一旦达到过一次“生命低于十分之一”的条件,
          则用一个“记号”记录下来。
          而只要这个“记号”生效着,则回血、回气持续进行。
          这个记号可以是变量(var),也可以是随便一个透明的explod
          (后者严格说不规范,属于numexplod条件的另类运用;
          不严谨,当explod数量超过限额时会BUG,虽然这种情况极少;
          但不占用有限的变量位置是其优点)
          变量方法为:
          [state ]
          type = varset
          trigger1 = life <= floor(lifemax/10)
          var(0) = 1
          【注意,这里用的变量号是0,实际使用时你必须用一个没有被原人物占用的变量,否则引起冲突,破坏了原人物的系统】
          然后将回血、回气条件,改为
          triggerall = var(0) = 1
          ——————————————————————————
          explod方法如GM所言
          用explod控制器创建一个贴图,其中动画用一个空白的,时间无限
          参数removeongethit=0
          指定其ID=某个数字,比如4321
          然后将回血、回气条件,改为
          triggerall = numexplod(4321)
          注意ID对应


          7楼2013-01-22 19:41
          收起回复
            完整的 丢-2下面
            [State 0, LifeAdd Explod]
            type = Explod
            trigger1 = Alive && !NumExplod(753)
            trigger1 = Life <= Const(data.life)*.01
            id = 753
            ontop = 1
            ownpal = 1
            anim = anim
            scale = 0,0
            ignorehitpause = 1
            removetime = 2147483647
            pausemovetime = 2147483647
            supermovetime = 2147483647
            [State 0, RemoveExplod]
            type = RemoveExplod
            triggerall = NumExplod(753)
            trigger1 = Life >= Const(data.life)*.99
            ID = 753
            ignorehitpause = 1
            [State 0, PowerAdd]
            type = PowerAdd
            trigger1 = Alive && NumExplod(753)
            value = 10
            ignorehitpause = 1
            [State 0, LifeAdd]
            type = LifeAdd
            trigger1 = Alive && NumExplod(753)
            value = 1
            ignorehitpause = 1


            IP属地:江苏9楼2013-01-22 21:31
            回复
              [State 0, RemoveExplod]
              type = RemoveExplod
              triggerall = NumExplod(753)
              trigger1 = Life >= Const(data.life)*.99
              trigger2 = !Alive
              ID = 753
              ignorehitpause = 1
              改一下 严谨点


              IP属地:江苏10楼2013-01-22 21:33
              收起回复