Const

From M.U.G.E.N Wiki

Jump to: navigation, search



Trigger: Const (*)

Returns the value of one of the player's constants.

Format:
Const(param_name)
Arguments:
param_name
The name of the constant to check. Valid values are:
Return type:
Depends on specified hit parameter. See Details.

Error conditions: none

Details:

The following values of param_name return values specified in the [Data] group in the player's constants.

  • data.life: Returns value of the "life" parameter. (int)
  • data.power: Returns value of the "power" parameter. (int)
  • data.attack: Returns value of the "attack" parameter. (int)
  • data.defence: Returns value of the "defence" parameter. (int)
  • data.fall.defence_mul: Returns value of the defence multiplier, calculated as 100/(f+100), where f is the "fall.defence_up" parameter. (float)
  • data.liedown.time: Returns value of the "liedown.time" parameter. (int)
  • data.airjuggle: Returns value of the "airjuggle" parameter. (int)
  • data.sparkno: Returns value of the "sparkno" parameter. (int)
  • data.guard.sparkno: Returns value of the "guard.sparkno" parameter. (int)
  • data.KO.echo: Returns value of the "ko.echo" parameter. (int)
  • data.IntPersistIndex: Returns value of the "IntPersistIndex" parameter. (int)
  • data.FloatPersistIndex: Returns value of the "FloatPersistIndex" parameter. (int)

The following values of param_name return values specified in the [Size] group in the player's constants.

  • size.xscale: Returns value of the "xscale" parameter. (float)
  • size.yscale: Returns value of the "yscale" parameter. (float)
  • size.ground.back: Returns value of the "ground.back" parameter. (int)
  • size.ground.front: Returns value of the "ground.front" parameter. (int)
  • size.air.back: Returns value of the "air.back" parameter. (int)
  • size.air.front: Returns value of the "air.front" parameter. (int)
  • size.height: Returns value of the "height" parameter. (int)
  • size.attack.dist: Returns value of the "attack.dist" parameter. (int)
  • size.proj.attack.dist: Returns value of the "proj.attack.dist" parameter. (int)
  • size.proj.doscale: Returns value of the "proj.doscale" parameter. (int)
  • size.head.pos.x: Returns x-component of the "head.pos" parameter. (int)
  • size.head.pos.y: Returns y-component of the "head.pos" parameter. (int)
  • size.mid.pos.x: Returns x-component of the "mid.pos" parameter. (int)
  • size.mid.pos.y: Returns y-component of the "mid.pos" parameter. (int)
  • size.shadowoffset: Returns value of the "shadowoffset" parameter. (int)
  • size.draw.offset.x: Returns x-component of the "draw.offset" parameter. (int)
  • size.draw.offset.y: Returns y-component of the "draw.offset" parameter. (int)

The following values of param_name return values specified in the [Velocity] group in the player's constants.

  • velocity.walk.fwd.x: Returns value of the "walk.fwd" parameter. (float)
  • velocity.walk.back.x: Returns value of the "walk.back" parameter. (float)
  • velocity.run.fwd.x: Returns x-component of the "run.fwd" parameter. (float)
  • velocity.run.fwd.y: Returns y-component of the "run.fwd" parameter. (float)
  • velocity.run.back.x: Returns x-component of the "run.back" parameter. (float)
  • velocity.run.back.y: Returns y-component of the "run.back" parameter. (float)
  • velocity.jump.y: Returns y-component of the "jump.neu" parameter. Note: this is NOT "velocity.jump.neu.y". Only the "neu" parameters take a y-component value. (float)
  • velocity.jump.neu.x: Returns x-component of the "jump.neu" parameter. (float)
  • velocity.jump.back.x: Returns value of the "jump.back" paramamter. (float)
  • velocity.jump.fwd.x: Returns value of the "jump.fwd" parameter. (float)
  • velocity.runjump.back.x: Returns value of the "runjump.back" paramamter. (float)
  • velocity.runjump.fwd.x: Returns value of the "runjump.fwd" parameter. (float)
  • velocity.airjump.y: Returns y-component of the "airjump.neu" parameter. Note: this is NOT "velocity.airjump.neu.y". (float)
  • velocity.airjump.neu.x: Returns x-component of the "airjump.neu" parameter. (float)
  • velocity.airjump.back.x: Returns value of the "airjump.back" paramamter. (float)
  • velocity.airjump.fwd.x: Returns value of the "airjump.fwd" parameter. (float)
  • velocity.air.gethit.groundrecover.x: Returns x-component of the "air.gethit.groundrecover" parameter. (float)
  • velocity.air.gethit.groundrecover.y: Returns y-component of the "air.gethit.groundrecover" parameter. (float)
  • velocity.air.gethit.airrecover.mul.x: Returns x-component of the "air.gethit.airrecover.mul" parameter. (float)
  • velocity.air.gethit.airrecover.mul.y: Returns x-component of the "air.gethit.airrecover.mul" parameter. (float)
  • velocity.air.gethit.airrecover.add.x: Returns x-component of the "air.gethit.airrecover.add" parameter. (float)
  • velocity.air.gethit.airrecover.add.y: Returns x-component of the "air.gethit.airrecover.add" parameter. (float)
  • velocity.air.gethit.airrecover.back: Returns value of the "air.gethit.airrecover.back" parameter. (float)
  • velocity.air.gethit.airrecover.fwd: Returns value of the "air.gethit.airrecover.fwd" parameter. (float)
  • velocity.air.gethit.airrecover.up: Returns value of the "air.gethit.airrecover.up" parameter. (float)
  • velocity.air.gethit.airrecover.down: Returns value of the "air.gethit.airrecover.down" parameter. (float)

The following values of param_name return values specified in the [Movement] group in the player's constants.

  • movement.airjump.num: Returns value of the "airjump.num" parameter. (int)
  • movement.airjump.height: Returns value of the "airjump.height" parameter. (int)
  • movement.yaccel: Returns value of the "yaccel" parameter. (float)
  • movement.stand.friction: Returns value of the "stand.friction" parameter. (float)
  • movement.crouch.friction: Returns value of the "crouch.friction" parameter. (float)
  • movement.stand.friction.threshold: Returns value of the "stand.friction.threshold" parameter. (float)
  • movement.crouch.friction.threshold: Returns value of the "crouch.friction.threshold" parameter. (float)
  • movement.jump.changeanim.threshold: Returns value of the "jump.changeanim.threshold" parameter. (float)
  • movement.air.gethit.groundlevel: Returns value of the "air.gethit.groundlevel" parameter. (float)
  • movement.air.gethit.groundrecover.ground.threshold: Returns value of the "air.gethit.groundrecover.ground.threshold" parameter. (float)
  • movement.air.gethit.groundrecover.groundlevel: Returns value of the "air.gethit.groundrecover.groundlevel" parameter. (float)
  • movement.air.gethit.airrecover.threshold: Returns value of the "air.gethit.airrecover.threshold" parameter. (float)
  • movement.air.gethit.airrecover.yaccel: Returns value of the "air.gethit.airrecover.yaccel" parameter. (float)
  • movement.air.gethit.trip.groundlevel: Returns value of the "air.gethit.trip.groundlevel" parameter. (float)
  • movement.down.bounce.offset.x: Returns x-component of the "down.bounce.offset.x" parameter. (float)
  • movement.down.bounce.offset.y: Returns y-component of the "down.bounce.offset.y" parameter. (float)
  • movement.down.bounce.yaccel: Returns value of the "down.bounce.yaccel" parameter. (float)
  • movement.down.bounce.groundlevel: Returns value of the "down.bounce.groundlevel" parameter. (float)
  • movement.down.friction.threshold: Returns value of the "down.friction.threshold" parameter. (float)

Example:

trigger1 = Const(velocity.walk.fwd.x) > 4
  Triggers if the forward walking velocity is greater than 4.


Personal tools