Make Dashing cost Mp??

Joined
Oct 21, 2014
Messages
30
Reaction score
8
First Language
English
Primarily Uses
RMVXA
Is there a way to make Dashing Cost Mp without a script??

I am in need for that since my game The Chosen One will have that implimented in it.
 

Roninator2

Gamer
Veteran
Joined
May 22, 2016
Messages
2,669
Reaction score
566
First Language
English
Primarily Uses
RMVXA
I suppose you could workaround by having a parallel process on each map.
In it you would check to see if the shift is being pressed. ( you would have to limit dashing when the button is being pressed ).
The do a count for 60 frames and then subtract 1 from mp.
But this does not stop dashing from happening even if the mp was 0.
The best way would be to use a script.
 
Joined
Oct 21, 2014
Messages
30
Reaction score
8
First Language
English
Primarily Uses
RMVXA
I suppose you could workaround by having a parallel process on each map.
In it you would check to see if the shift is being pressed. ( you would have to limit dashing when the button is being pressed ).
The do a count for 60 frames and then subtract 1 from mp.
But this does not stop dashing from happening even if the mp was 0.
The best way would be to use a script.
True, I do see that point, I will have to look into that and try a few things :3
 

A-Moonless-Night

WINTER IS COMING
Veteran
Joined
Mar 17, 2012
Messages
681
Reaction score
446
First Language
English
Primarily Uses
RMVXA
Code:
class Game_Player < Game_Character
  alias amn_mpdash_gameplayer_dash? dash?
  def dash?
    return false if $game_party.leader.mp.zero?
    amn_mpdash_gameplayer_dash?
  end
end

class Game_Actor < Game_Battler
  alias amn_mpdash_gameactor_onplayerwalk on_player_walk
  def on_player_walk
    amn_mpdash_gameactor_onplayerwalk
    self.mp -= 1 if $game_player.dash? && self == $game_party.leader
    # ^ change 1 to whatever integer you want
  end
end
That will make it so that the party leader loses 1 MP every step when dashing.
 
Joined
Oct 21, 2014
Messages
30
Reaction score
8
First Language
English
Primarily Uses
RMVXA
Code:
class Game_Player < Game_Character
  alias amn_mpdash_gameplayer_dash? dash?
  def dash?
    return false if $game_party.leader.mp.zero?
    amn_mpdash_gameplayer_dash?
  end
end

class Game_Actor < Game_Battler
  alias amn_mpdash_gameactor_onplayerwalk on_player_walk
  def on_player_walk
    amn_mpdash_gameactor_onplayerwalk
    self.mp -= 1 if $game_player.dash? && self == $game_party.leader
    # ^ change 1 to whatever integer you want
  end
end
That will make it so that the party leader loses 1 MP every step when dashing.
Thanks :3
 

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

Latest Threads

Latest Profile Posts

This is relevant so much I can't even!
Frostorm wrote on Featherbrain's profile.
Hey, so what species are your raptors? Any of these?
... so here's my main characters running around inside "Headspace", a place people use as a safe place away from anxious/panic related thinking.
Stream will be live shortly! I will be doing some music tonight! Feel free to drop by!
Made transition effects for going inside or outside using zoom, pixi filter, and a shutter effect

Forum statistics

Threads
105,999
Messages
1,018,220
Members
137,778
Latest member
lifehoroscopee
Top