YesNoOk
avatar

HitDef velocity parameters being read as nonexistent. (Read 325 times)

Started by Javier, August 09, 2019, 03:20:07 am
Share this topic:
HitDef velocity parameters being read as nonexistent.
#1  August 09, 2019, 03:20:07 am
  • avatar
  • *
    • USA
the code:
ground.velocity = -vel x,-4
guard.velocity = vel y
air.velocity = -vel x,-2
airguard.velocity = -vel x,-2

Also,my code is proof that mugen is inconsistent with reading code,as it works in this code:
ground.velocity = -vel x,0
air.velocity = -vel x,-1.6


Last Edit: August 09, 2019, 03:15:38 pm by Javier
Re: HitDef velocity parameters being read as nonexistent.
#2  August 09, 2019, 03:36:23 am
  • ***
  • CPU Purple Heart
    • USA
    • www.dailymotion.com/2a8130871d2742d2f4da3b069

  • Online
 I've never seen vel x being used before as hit velocity parameters in a hitdef before, so, I can't fully confirm unless I do tests myself. It's likely because there is no pre-existent hit velocity, so, it might be read as a value of 0. I need to make tests to confirm this, but either way, I would set up a displayclipboard for the target's x velocity and y velocity to see what numbers come up when the hitdef connects.

Edit: Did some tests and I was correct about my theory. Since P2 has no pre-existing hit velocity, the value comes up as 0 when hitdefs using vel x for hit velocity connects.
Last Edit: August 09, 2019, 03:42:20 am by Nep Heart
Re: HitDef velocity parameters being read as nonexistent.
#3  August 09, 2019, 03:48:56 am
  • avatar
  • *
    • USA
So your saying that the vel x and y are being read from p2 and not p1?
Re: HitDef velocity parameters being read as nonexistent.
#4  August 09, 2019, 03:58:13 am
  • ***
  • CPU Purple Heart
    • USA
    • www.dailymotion.com/2a8130871d2742d2f4da3b069

  • Online
 No, I used displaytoclipboard to read P2's vel when testing a hitdef with the velocities you were using and it read the values as being 0. I think you need to actually define a number to give the hitdefs hit velocities. If your goal is to stack hit velocities to the target's pre-existing velocity, you may need to use custom states and gethitvars for that kind of trick or use a variable that keeps track of P2's velocities and add it to the hitdef's vel.
Re: HitDef velocity parameters being read as nonexistent.
#5  August 09, 2019, 04:24:05 am
  • avatar
  • *
    • USA
So basically,yes.
Re: HitDef velocity parameters being read as nonexistent.
#6  August 13, 2019, 04:06:42 pm
  • *****
  • Shame on you!
    • USA
I'm pretty sure I've done this before, and if I remember correctly, those will read P2's info.
If you don't want to use a var to keep track of your P1's vel, you _might_ be able to use Root. But don't quote me on that.
vVv Wheat Stage Released vVv
Re: HitDef velocity parameters being read as nonexistent.
#7  August 15, 2019, 11:34:17 am
  • ******
  • Legendary XIII
  • I am the eye of the storm to come!
    • New Zealand
    • network.mugenguild.com/cyanide/
A hitdef assigns things to p2 to do. If your velocity is 0. All those should evaluate 0 and not send a velocity. Is your character moving at an appreciable rate when you hit p2 or is it standing still? Even if it is moving if its very slow friction will make the hit do almost nothing as well.


In M.U.G.E.N there is no magic button

They say a little knowledge is a dangerous thing, but it's not one half so bad as a lot of ignorance.