Envision, Create, Share

Welcome to HBGames, a leading amateur game development forum and Discord server. All are welcome, and amongst our ranks you will find experts in their field from all aspects of video game design and development.

[Resolved] Moving a character using rgss

i want to move a character with rgss. I use 4.times{$game_player.move_right} for example.

The thing is the character moves TOO FAST(doesn't matter what speed) and if I use .moving? the character only moves once.


Thank you.
 
use this:

[rgss] 
var = 0 # declares a new local variable, to hold how many times the player has moved right
loop do # begins a loop
  $game_player.move_right # moves the player
  var += 1 # adds one to our movement variable
  break if var >= 4 # stop looping if player has moved 4 times
end # where loop repeats from
 
[/rgss]

Mess around with that and see what happens.
 

Thank you for viewing

HBGames is a leading amateur video game development forum and Discord server open to all ability levels. Feel free to have a nosey around!

Discord

Join our growing and active Discord server to discuss all aspects of game making in a relaxed environment. Join Us

Content

  • Our Games
  • Games in Development
  • Emoji by Twemoji.
    Top