How to change jump speed?

AllyJamy

Veteran
Veteran
Joined
Sep 24, 2015
Messages
65
Reaction score
36
First Language
English
Primarily Uses
RMVXA
Hi,

I'm trying to get the jump speed to be slower.

Context here is the player is in a low gravity environment and the fast and snappy default jump looks out of place.

I'd like to slow it down so it looks like gravity is affecting the player. Does anyone know how this can be done?
 

Roninator2

Gamer
Veteran
Joined
May 22, 2016
Messages
2,672
Reaction score
566
First Language
English
Primarily Uses
RMVXA
Just tested it. Works but has undesired results.
Game_CharacterBase line 285 if you set the @jump_count -= 0.1 instead of 1
the jump goes slow at the end and fast at the start. Because there needs to be math to calculate the real position or perhaps pixel movement.
With this the jump goes to the landing position and drops slowly.
If there is a better way it involves complex calculations and I don't know those.
 

AllyJamy

Veteran
Veteran
Joined
Sep 24, 2015
Messages
65
Reaction score
36
First Language
English
Primarily Uses
RMVXA
Just tested it. Works but has undesired results.
Game_CharacterBase line 285 if you set the @jump_count -= 0.1 instead of 1
the jump goes slow at the end and fast at the start. Because there needs to be math to calculate the real position or perhaps pixel movement.
With this the jump goes to the landing position and drops slowly.
If there is a better way it involves complex calculations and I don't know those.
In my game my character just did the cha cha slide back and fro before finally sliding to the place he would have landed if he had jumped. Very odd behaviour lol. Thanks though, I'll keep playing around with that line of code.

Edit: @jump_count -= 0.5 is the sweet spot. Works perfect.

Thanks a lot!
 

AllyJamy

Veteran
Veteran
Joined
Sep 24, 2015
Messages
65
Reaction score
36
First Language
English
Primarily Uses
RMVXA
Just tested it. Works but has undesired results.
Game_CharacterBase line 285 if you set the @jump_count -= 0.1 instead of 1
the jump goes slow at the end and fast at the start. Because there needs to be math to calculate the real position or perhaps pixel movement.
With this the jump goes to the landing position and drops slowly.
If there is a better way it involves complex calculations and I don't know those.
I've been trying to get this to work depending on a condition switch. but I can't get that to work. Sorry, but do you know how i can set this up in the script? xd

Heres what I currently have...


Ruby:
  #--------------------------------------------------------------------------
  # * Update While Jumping
  #--------------------------------------------------------------------------
  def update_jump
    
  if $game_switches[937] #switch for low G
    @jump_count -= 0.5 # 1 ,  0.5
  else
    @jump_count -= 1 # 1 ,  0.5
    @real_x = (@real_x * @jump_count + @x) / (@jump_count + 1.0)
    @real_y = (@real_y * @jump_count + @y) / (@jump_count + 1.0)
    update_bush_depth
    if @jump_count == 0
      @real_x = @x = $game_map.round_x(@x)
      @real_y = @y = $game_map.round_y(@y)
      
    end
  end
end
 

AllyJamy

Veteran
Veteran
Joined
Sep 24, 2015
Messages
65
Reaction score
36
First Language
English
Primarily Uses
RMVXA
Well I figured it out eventually. If anyone else wants to do anything similar to this replace the "update while jumping" section in Game_CharacterBase with this


Ruby:
  #--------------------------------------------------------------------------
  # * Update While Jumping
  #--------------------------------------------------------------------------

  def update_jump
   
     if $game_switches[937] #switch for low G
       @jump_count -= 0.5
            @real_x = (@real_x * @jump_count + @x) / (@jump_count + 1.0)
    @real_y = (@real_y * @jump_count + @y) / (@jump_count + 1.0)
    update_bush_depth

     else
       @jump_count -= 1
      @real_x = (@real_x * @jump_count + @x) / (@jump_count + 1.0)
    @real_y = (@real_y * @jump_count + @y) / (@jump_count + 1.0)
    update_bush_depth
    if @jump_count == 0
      @real_x = @x = $game_map.round_x(@x)
      @real_y = @y = $game_map.round_y(@y)
   
      end
  end
end
 

AllyJamy

Veteran
Veteran
Joined
Sep 24, 2015
Messages
65
Reaction score
36
First Language
English
Primarily Uses
RMVXA
All you needed was
Ruby:
  if $game_switches[937] #switch for low G
    @jump_count -= 0.5
  else
    @jump_count -= 1
  end
Think I tried this and had various weird results
 

Users Who Are Viewing This Thread (Users: 0, Guests: 1)

Latest Threads

Latest Posts

Latest Profile Posts

Just beat the last of us 2 last night and starting jedi: fallen order right now, both use unreal engine & when I say i knew 80% of jedi's buttons right away because they were the same buttons as TLOU2 its ridiculous, even the same narrow hallway crawl and barely-made-it jump they do. Unreal Engine is just big budget RPG Maker the way they make games nearly identical at its core lol.
Can someone recommend some fun story-heavy RPGs to me? Coming up with good gameplay is a nightmare! I was thinking of making some gameplay platforming-based, but that doesn't work well in RPG form*. I also was thinking of removing battles, but that would be too much like OneShot. I don't even know how to make good puzzles!
one bad plugin combo later and one of my followers is moonwalking off the screen on his own... I didn't even more yet on the new map lol.
time for a new avatar :)

Forum statistics

Threads
106,017
Messages
1,018,356
Members
137,802
Latest member
rencarbali
Top