I just recently read up on Ruby, learned how it functions, etc, so that I can jump right in and do something with RMXP. So, my first task was to create a variable that displays on screen. Got that alright. My second, more ambitious task was to do map scrolling.
Having messed around enough, the map no longer stops at the edge of itself, instead, it shows what's on the opposite side of the map. Okay, so that was actually easy to do. Then I recoded the valid? and... hell, I forget now. The 2 things that checked if the square you're moving to was valid, and passable, or something. I changed a bunch, and forgot now. The point is, it now checks the opposite value on the edge of the screen (so $game_map.width-1 for moving left, etc), and will "let" you move there if it's okay. Of course, I then had to add code to the move_left, etc bits so that if @x < 0, or > $game_map.width, to put it at the opposite side of the screen.
Now... amusingly, when the code ran, it worked... but 2 problems emerged. #1 is obvious; the events on the opposite side of the screen just don't show up offscreen, where it repeats. I'm sure I could fix that... somehow. #2: redefining @x and/or @y makes the character move... instead of just "appear" where the new @x and @y values are. That's because of the code that's all up ins the update/refresh thing, right? I'm sure I can redefine that somehow...
Anyway, my short, very easy question is, and was; Has anyone actually successfully coded map scrolling (like was available on RM2K)?
Having messed around enough, the map no longer stops at the edge of itself, instead, it shows what's on the opposite side of the map. Okay, so that was actually easy to do. Then I recoded the valid? and... hell, I forget now. The 2 things that checked if the square you're moving to was valid, and passable, or something. I changed a bunch, and forgot now. The point is, it now checks the opposite value on the edge of the screen (so $game_map.width-1 for moving left, etc), and will "let" you move there if it's okay. Of course, I then had to add code to the move_left, etc bits so that if @x < 0, or > $game_map.width, to put it at the opposite side of the screen.
Now... amusingly, when the code ran, it worked... but 2 problems emerged. #1 is obvious; the events on the opposite side of the screen just don't show up offscreen, where it repeats. I'm sure I could fix that... somehow. #2: redefining @x and/or @y makes the character move... instead of just "appear" where the new @x and @y values are. That's because of the code that's all up ins the update/refresh thing, right? I'm sure I can redefine that somehow...
Anyway, my short, very easy question is, and was; Has anyone actually successfully coded map scrolling (like was available on RM2K)?