The Mugen Fighters Guild

Help => M.U.G.E.N Development Help => Topic started by: Skyro on January 22, 2020, 01:36:58 PM

Title: TELEPORTATION DODGE
Post by: Skyro on January 22, 2020, 01:36:58 PM
Hello. please I would like to know how to configure a teleportation or a permutation when a key is pressed just before receiving an attack. In console games, when the defense key is pressed just before the attack hits the character, it disappears (or swaps as in Naruto Ultimate ninja storm). That's all. I wish I could avoid an attack by teleporting by pressing the defense button. The teleportation is triggered only if the attack is on the verge of hitting the character.
Title: Re: TELEPORTATION DODGE
Post by: Cyanide on January 22, 2020, 02:19:43 PM
You can't really tell when an opponent is about to activate a hit. You could activate a reversaldef that lasts a very short period and if hit in that timeframe the teleport occurs but it does mean p2 has to make some sort of contact rather than miss completely.

Just defence works a bit like this but thats possible because everything is on your side. Time of pressing back vs the time before you guard it.
Title: Re: TELEPORTATION DODGE
Post by: altoiddealer on January 23, 2020, 03:57:30 PM
You could use "enemynear,MoveType=A" paired with some arbitrary X distance from your character, as a trigger.

Roughly:

triggerall = enemynear,MoveType=A
triggerall = enemynear,Pos X - Pos X < 100
Title: Re: TELEPORTATION DODGE
Post by: Odb718 on January 24, 2020, 01:04:16 AM
You should be able to get P2's width and use that to guess the attacking distance.
I use
y = enemynear, Const(size.mid.pos.y)+(enemynear,pos y)+(7*cos(5*pi/60*time))
In Samus to guess where my Metroid should hover.
You should be able to pull the xscale, and the ground.front, and maybe the attack.dist to get an accurate guess. I dont know how good some creators do their attack.dist. Constants are always a guessing game.

I think if you were to get super complex with things, you could attach a helper to P2 that monitors what movetype it's in if you wanted the move to work no matter where P1 is.