* *
Welcome, Guest. Please login or register.
Did you miss your activation email?
September 26, 2017, 02:05:50 PM

Login with username, password and session length

Help with floating after jump

  • 11 Replies
  • 812 Views
*

Offline Skull Kingz

  • Full Member
  • ***
  • 124
  • OpenBor Amateur -M.U.G.E.N. Rookie!
    • Youtube Page
Help with floating after jump
« on: April 05, 2017, 04:15:03 PM »
Wassup everyone, I need help with trying to make my character float/land slowly. Best example gameplay wise that I can think of is Super Mario with his cape on Super Mario World. How can I mimic that?


Sorry, I'm on mobile right now.
-The Burning Fox! Out Now!
-Making games since 2008
https://www.youtube.com/user/UntoldDreamsAnime

*

Offline Bloodbane

  • Hero Member
  • *****
  • 3109
  • Dark Dragon
Re: Help with floating after jump
« Reply #1 on: April 06, 2017, 12:37:25 AM »
 One way I know is to alter antigravity during floating then reset antigravity after landing (in any way) with script

*

Offline SaintJudas

  • Full Member
  • ***
  • 172
Re: Help with floating after jump
« Reply #2 on: July 09, 2017, 07:31:31 PM »
Anybody have the script for this? I'm doing a similar thing. Though all I need is to be able to change the antigravity setting for a short time in one move.

*

Offline Bloodbane

  • Hero Member
  • *****
  • 3109
  • Dark Dragon
Re: Help with floating after jump
« Reply #3 on: July 10, 2017, 01:18:27 AM »
 I usually use functions for this but to simplify my answer, this will do:

Quote
anim   freespecial
@script
  if(frame==1){
    void self = getlocalvar("self");
    changeentityproperty(self, "antigravity", Ratio);
  }
  if(frame==2){
    void self = getlocalvar("self");
    changeentityproperty(self, "antigravity", Ratio);
  }
@end_script
...

 This script will alter gravity in second frame and in third frame. Change defined frame to suit your animation
 Replace Ratio with desired value

*

Offline SaintJudas

  • Full Member
  • ***
  • 172
Re: Help with floating after jump
« Reply #4 on: July 11, 2017, 05:37:22 PM »
Thank you for this.
Tried to apply it myself, but now the player rockets through the top of the screen and dies once its triggered.

*

Offline Bloodbane

  • Hero Member
  • *****
  • 3109
  • Dark Dragon
Re: Help with floating after jump
« Reply #5 on: July 13, 2017, 01:34:05 AM »
 Can we see the animation+script?

*

Offline msmalik681

  • Hero Member
  • *****
  • 755
Re: Help with floating after jump
« Reply #6 on: July 14, 2017, 03:15:25 AM »
a custom animation script would be better suited for this.

I was thinking to use stop then floater for anti gravity then dasher with a small value like 0.1 to float down.

*

Offline SaintJudas

  • Full Member
  • ***
  • 172
Re: Help with floating after jump
« Reply #7 on: July 21, 2017, 05:04:36 PM »
Honestly? I'm reworking the mod you helped me with before.  :-[
I've removed the ladders because a key component to some of the planned game play, required the ability to attack and jump to, and from, ladders/ropes/chains/etc. I did keep the ability to wall jump, but it had to be changed.  It's wouldn't be a useful feature if it can't work with both walls, platforms, and other entities. Especially since i'm using breakable platforms.  As such, It made sense at the time to break the wall/platform  jump down into parts:

1. regular jump, then -
2. freespecial#X in-air (collision detector), then -
3. follow anim wall grab/land (ONLY IF freespecial#X connects to wall/platform/enemy/etc) Press J during this anim to cancel into -
4. freespecial#Y wall jump facing opposite direction. (press Jump to cancel into freespecial#X again.)
    If walls/platforms are close enough together,  a wall jumping character can reach areas that a double jumping character cannot.
 
What I'm trying to do is have the character stick to the wall for the duration of the delay, of only the first frame, of the follow anim. If J is pressed while the character is still in that first frame, they will perfom the freespecial#Y wall jump. If J is not pressed, the character will perform the remainder of its follow anim instead. Letting go of the wall, and falling straight down.
 
The problems I'm having right now are that:
A - follow anim wall grab immediately slides downward at normal fall speed. I'd like him to just stick for a moment.
B - wall/platform jumping from a previous wall/platform jump does not work anymore. freespecial#X does connect into its follow anim, but pressing J
      again will not cancel into freespecial#Y.

 

*

Offline Don Drago

  • Full Member
  • ***
  • 50
  • LOLWTFHITS?
Re: Help with floating after jump
« Reply #8 on: July 22, 2017, 05:13:03 PM »
Maybe the script I used on Super Final Fight Gold Plus can solve wall jump. But that script is boken down into some functions to detect walls, combined with animation scripts on each char.

Look into Guy, Chun Li, Vega (since my PC crashed, I don't have anything to unpack SFFGP right now).
See if it suits what you're asking for


*

Offline Bloodbane

  • Hero Member
  • *****
  • 3109
  • Dark Dragon
Re: Help with floating after jump
« Reply #9 on: July 25, 2017, 08:56:09 AM »
 Oh sorry, I thought you were talking about new mod
 Anyways, I've updated that mod and wall jump works better now i.e it can be performed against platforms as well :D
 Check your PM

 For others, Vyck's problem can be solved with this function:

Code: [Select]
void floater(int Time )
{// Floats in Time centiseconds
    void self = getlocalvar("self");
    int eTime = openborvariant("elapsed_time");

    changeentityproperty(self, "tosstime", eTime + Time*2);
}

 This function will make caller unaffected by gravity for defined time (in centiseconds). If the caller is attacked while floating, the FX will be gone
 It's much cleaner than altering gravity

*

Offline erf_beto

  • Hero Member
  • *****
  • 514
Re: Help with floating after jump
« Reply #10 on: July 26, 2017, 11:49:59 AM »
One way I know is to alter antigravity during floating then reset antigravity after landing (in any way) with script
isn't this really dangerous? I fiddled with it on MFA mod, but while it does seem to produce the best looking results, I had to toggle gravity back on on a lot of animations, like cancels, and getting hit mid air... there were just too many loopholes to be effective. I'd love to see it work though.

*

Offline Bloodbane

  • Hero Member
  • *****
  • 3109
  • Dark Dragon
Re: Help with floating after jump
« Reply #11 on: July 26, 2017, 11:54:36 PM »
 Yes, it is unstable. If you really insist, resetting antigravity could be done with script in takedamagescript and keyscript

[couple hours later]

 I decided to think outside the box and look for alternate solutions. After some trial n errors, I got a simple and great solution. Instead of toying with unstable antigravity, I played with velocity instead, here's an example:

Quote
anim freespecial
   loop   1 3 7
   cancel 0 5 0 a2 freespecial2
   cancel 0 5 0 a4 freespecial3
   delay 13
   sound data/sounds/jump.wav
   offset  114  114
   bbox  107  71  12  22
   @cmd   keyglide 0.1
   frame data/chars/char/31.gif
   @cmd   keyglide 0.1
   frame data/chars/char/32.gif
   @cmd   keyglide 0.1
   frame data/chars/char/33.gif
   @cmd   keyglide 0.1
   frame data/chars/char/34.gif
   @cmd   keyglide 0.1
   frame data/chars/char/35.gif
   @cmd   keyglide 0.1
   frame data/chars/char/36.gif #
   @cmd   keyglide 0.1
   frame data/chars/char/33.gif
   @cmd   keyglide 0.1
   frame data/chars/char/34.gif
   @cmd   keyglide 0.1
   frame data/chars/char/35.gif
   @cmd   keyglide 0.1
   frame data/chars/char/36.gif #

 This Charlotte Aurin's double jump animation. The added functions allow her to glide in this animation by holding Jump key
 keyglide 0.1 means falling velocity is reduced to 0.1 or 10%
 That animation is looped to ensure the glide FX works while she's on air
 Here's the keyglide function:

Code: [Select]
void keyglide(float Ratio)
{// Floats hero if Jump button is held or released
    void self = getlocalvar("self");
    int iPIndex = getentityproperty(self,"playerindex"); //Get player index
    void iRKey = playerkeys(iPIndex, 0, "jump");
    float Vy = getentityproperty(self,"tossv");

    if(iRKey && Vy < 0){// Jump is held?
      changeentityproperty(self, "velocity", NULL(), NULL(), Vy*Ratio);
    }
}
« Last Edit: July 27, 2017, 08:56:47 AM by Bloodbane »

 

Recent

Members
  • Total Members: 6410
  • Latest: KingWei
Stats
  • Total Posts: 46128
  • Total Topics: 3162
  • Online Today: 46
  • Online Ever: 316
  • (January 04, 2013, 09:43:02 AM)
Users Online