Auto rotating when passing by character in VS mode

ABK

Well-known member
Do you guys have clues whats the best way to do that?
So when 2 enemies fight then they wouldnt flip when you press to walk into opposite direction , you would walk backwards, then you would automatically flip when enemy will jump over you , or when he will go through you.Even better if you would be able to disable going through opponents.
Anyone tried that and can share some ideas or code?
 
Are you trying to make system for 1vs1 game?

I can't say much since I never made one myself but one thing I highly recommend is to register both characters in 2 global variables. There will be many benefits you can get by doing this such as ending the fight when one character is defeated and displaying lifebar & other HUD stuffs
One benefit related to this thread is to force facing direction to both characters. And instead of detecting opponent, each character will check those variables and acquire the one which contain his/her opponent handler. You get x coordinates, compare then flip if he/she's behind

Even better if you would be able to disable going through opponents.

Hmmm.... the idea crossed my mind is to use script to check opponent's position and cancel any character's movement if he/she enters opponent's 'block area'

That what I can share for now :)
 
@bWWd - I got this to work okay.

Just give player BACKWALK animation, and set turndelay  to a high value (like 999).  Then declare the script magga's posted @cmd conditionalflip2 in WALK and IDLE anims.
 
how does it work against 2 players not just one, i have vs mode where one player can fight with 3 human players at once and + cpu enemy player so there are many characters onscreen, does it work properly with more than 1 opponent ?
 
Yeah it's not auto-target.  It's just checking your last opponent, so it's working like old school wrestling games.  So whomever you're fighting at the time should be who face.  Unless you get hit or hit another opponent it should keep facing the last enemy/player you attacked. 

I'm used to this from old wrestling games.  It's either like this or it will auto-switch to nearest enemy.  Both methods have pros and cons. 

I think it's good like this for what I wanted, I kind of prefer it when it doesn't change target unless you attack or get attacked.  But it's probably easy enough to add range check, so it will switch again to closest target, if the current one gets out of range.

We could also use IDLE2 to control this.

The "playerpush" in Mugen. Its something I miss in OpenBOR sometimes.
In theory, if we put platform in IDLE/WALKING anim couldn't we script this?
 
In theory, if we put platform in IDLE/WALKING anim couldn't we script this?
In Mugen, this is triggered everytime. In fact, to be able to pass throught another player like we do in OpenBOR, we need to turn it off, not turn it on.

Disables the player's push checking for one tick. Push checking keeps players from overlapping one another. By temporarily disabling push checking, dodge-type moves in which the player passes through another (but can still be hit) can be implemented.

Required parameters:
value = push_flag (boolean)
If push_flag is nonzero, then push checking is enabled. If push_flag is zero, then push checking is disabled.
http://elecbyte.com/mugendocs/sctrls.html#playerpush

 
Back
Top Bottom