POKEMON-STYLE MOVEMENT?
Posts
Pages:
1
I'm new to RPG Maker and the movement seems very difficult to modify.
I want to make it so if you're facing up, but tap right, it'll make you face right without movement. And if you hold right / tap right again, it will move you right.
I want to make it so if you're facing up, but tap right, it'll make you face right without movement. And if you hold right / tap right again, it will move you right.
You need to specify which version of RPG Maker you are using when you ask for help of any kind.
I don't think that is too hard, there are probably scripts for it.
I don't think that is too hard, there are probably scripts for it.
You might want to try adding a common event that runs as a parallel process. Create conditional branches that check to see if any of the directional button is being pressed, and in each branch, use the "set move route" command to move the player in the respective direction.
I think the trick, though, would be to add some sort of delay to that movement, thought the use of "wait" commands. I haven't tried implementing this myself and I don't know how to go about this, honestly, but that could be a head start.
I think the trick, though, would be to add some sort of delay to that movement, thought the use of "wait" commands. I haven't tried implementing this myself and I don't know how to go about this, honestly, but that could be a head start.
I'm using VX Ace and know little coding. If any scripting is suggested, I need it to be fairly specific.
Yes. Multiple people will be playing this game at once and I don't want movement unless it's somewhat agreed upon.
Using a multiplay feature? That's rather... Curious, as I can't see how you'll be doing that with basic scripting. :V
Interesting.
Interesting.
I'm still with Joseph on "how you'll be doing that with basic scripting." Multiplayer doesn't seem so basic, though I've never looked into it.
Anyways, here's a really bad snippet that I made in like 5 mins.
Checks if player is facing the direction before moving, if not, they turn and don't move. I had to change the Input.press to trigger, which makes it quite choppy (have to press for each move now, hold down a key will move you up one time) but I guess that could work for a TwitchPlaysPokemon?
Also I don't know how this effects event movements since I did change the move on characterbase.
Anyways, here's a really bad snippet that I made in like 5 mins.
#==============================================================================
# ** Game_CharacterBase
#------------------------------------------------------------------------------
# This base class handles characters. It retains basic information, such as
# coordinates and graphics, shared by all characters.
#==============================================================================
class Game_CharacterBase
#--------------------------------------------------------------------------
# * Move Straight
# d: Direction (2,4,6,8)
# turn_ok : Allows change of direction on the spot
#--------------------------------------------------------------------------
def move_straight(d, turn_ok = true)
@move_succeed = passable?(@x, @y, d)
# added a direction check
if @direction != d
set_direction(d)
elsif @move_succeed
set_direction(d)
@x = $game_map.round_x_with_direction(@x, d)
@y = $game_map.round_y_with_direction(@y, d)
@real_x = $game_map.x_with_direction(@x, reverse_dir(d))
@real_y = $game_map.y_with_direction(@y, reverse_dir(d))
increase_steps
elsif turn_ok
set_direction(d)
check_event_trigger_touch_front
end
end
end
#==============================================================================
# ** Game_Player
#------------------------------------------------------------------------------
# This class handles the player. It includes event starting determinants and
# map scrolling functions. The instance of this class is referenced by
# $game_player.
#==============================================================================
class Game_Player < Game_Character
alias q_move_by_trigger move_by_input
#--------------------------------------------------------------------------
# * Processing of Movement via Input from Directional Buttons
#--------------------------------------------------------------------------
def move_by_input
return unless move_trigger?
q_move_by_trigger
end
def move_trigger?
# checks for direction key triggers
if Input.trigger?(:UP)
return true
elsif Input.trigger?(:DOWN)
return true
elsif Input.trigger?(:LEFT)
return true
elsif Input.trigger?(:RIGHT)
return true
else
return false
end
end
end
Checks if player is facing the direction before moving, if not, they turn and don't move. I had to change the Input.press to trigger, which makes it quite choppy (have to press for each move now, hold down a key will move you up one time) but I guess that could work for a TwitchPlaysPokemon?
Also I don't know how this effects event movements since I did change the move on characterbase.
Pages:
1














