YesNoOk
avatar

[SOLVED] Dealing damage without changing opponent's state? (Read 182 times)

Started by Devsman, April 17, 2011, 10:21:44 pm
Share this topic:
[SOLVED] Dealing damage without changing opponent's state?
New #1  April 17, 2011, 10:21:44 pm
  • avatar
  • **
I have an attack I wanted my character to be able to perform quickly and repeatedly without interrupting what the opponent is doing.  Like Fox's blaster in Super Smash Bros. or as if P2 has super armor. 

The problem is that the HitDef controller always changes p2's state to a gethit state then put it into an idle state, so even if you give it ground.hittime =0 it can interrupt the opponent if he/she is attacking.  I tried a couple of tricks with Hitdef's p2stateno parameter to put the character back into the state it was just in, but it always seems to reset the state.

So I guess I'm asking if there's some way to inflict damage based on a collision without affecting their state.
Last Edit: April 18, 2011, 12:50:42 am by Devsman
Re: Dealing damage without changing opponent's state?
#2  April 18, 2011, 12:41:48 am
  • ******
  • Legendary XIII
  • I am the eye of the storm to come!
    • New Zealand
    • network.mugenguild.com/cyanide/
This is a weird hack, and requires you to hit them at least once first.

If a helper applies a reversal to p2 they will retain the target regardless. So you hit p2 and spawn a helper. The helper has an active reversaldef. P2 in a custom state uses a hitdef. The helper reverses it then returns p2 to another custom state, which then selfstates. The helper can then use targetlifeadd despite not having a target.

You will probably need to mess with variables as you are unable to use gethitvar(damage) or anything like that at this point. This will be manually setting the variable to how much damage it should do. Then the best you can do is detect p2dist during your attacks to sorta guess if he "ought" to be hit.


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.
Re: Dealing damage without changing opponent's state?
#3  April 18, 2011, 12:47:46 am
  • avatar
  • **
Huh.  That's pretty bizarre.  I'll give it a shot, but I might consider just doing something else instead.   o_O  Thanks Cyanide, you da man.