RPG Maker Forums

Hi guys I am struggling with a certain part I wanted to convert Rhyme Smooth Scrolling from Ace for my OWN use in my game (and obviously all the credit would be gave )


but at a point I am struggling with some part....I just don't know how to properly convert the line for work in MV...since MV is the same but in same time Nope not the same....


so I would be really happy if you guys can help me.

Code:
  alias initialize_rhyme initialize
  def initialize
    initialize_rhyme
    @t_display_x = @display_x
    @t_display_y = @display_y
  end
  #--------------------------------------------------------------------------
  # ● Set Display Position
  #--------------------------------------------------------------------------
  def set_display_pos(x, y)
    x = [0, [x, width - screen_tile_x].min].max unless loop_horizontal?
    y = [0, [y, height - screen_tile_y].min].max unless loop_vertical?
    @t_display_x = @display_x = (x + width) % width
    @t_display_y = @display_y = (y + height) % height
    @parallax_x = x
    @parallax_y = y
  end
  #----


the JS version :

Code:
// FROM THE ORIGINAL JS FILE
Game_Map.prototype.setDisplayPos = function(x, y) {
    if (this.isLoopHorizontal()) {
        this._displayX = x.mod(this.width());
        this._parallaxX = x;
    } else {
        var endX = this.width() - this.screenTileX();
        this._displayX = endX < 0 ? endX / 2 : x.clamp(0, endX);
        this._parallaxX = this._displayX;
    }
    if (this.isLoopVertical()) {
        this._displayY = y.mod(this.height());
        this._parallaxY = y;
    } else {
        var endY = this.height() - this.screenTileY();
        this._displayY = endY < 0 ? endY / 2 : y.clamp(0, endY);
        this._parallaxY = this._displayY;
    }
};

Latest Threads

Latest Posts

Latest Profile Posts

He mad, but he cute :kaopride:

Our latest feature is an interview with... me?!

People4_2 (Capelet off and on) added!

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!

Forum statistics

Threads
106,036
Messages
1,018,461
Members
137,821
Latest member
Capterson
Top