frame, realFrame, or something else as equivalent of RGSS viewport

Lihinel

Veteran
Veteran
Joined
Nov 9, 2013
Messages
261
Reaction score
321
First Language
German
Primarily Uses
Thought I figured out how to use the JS equivalent of viewport with frame, and it does seem to work in my Title Screen plugin:
Scene_Title.prototype.drawBackground = function() {
var bitmap = ImageManager.loadTitle1('TitleBG');
var bg = new Sprite(bitmap);
this._bg = bg;
this._bg._frame = new Rectangle(0,0,100,100);
this.addChild(bg);
}
But when I copy the method to a new Scene and change the Scene_Title to Scene_Test it displays the entire image instead of just a 100 by 100 box in the top left corner of the screen.

(realFrame doens't seem to work either, I used https://kinoar.github.io/rmmv-doc-web/classes/sprite.html as reference, if you got a better one, I'd be glad since all the links to the details seem to lead to a 404)
 

Poryg

Dark Lord of the Castle of Javascreeps
Veteran
Joined
Mar 23, 2017
Messages
4,125
Reaction score
10,640
First Language
Czech
Primarily Uses
RMMV
Actually, if you want to influence frame, you need to influence texture's frame (in this case it could be the bitmap as well I guess), not the sprite's frame. If you want to deal with sprites, you need to assign a PIXI mask filter to them.
 

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

Latest Threads

Latest Posts

Latest Profile Posts

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!
one bad plugin combo later and one of my followers is moonwalking off the screen on his own... I didn't even more yet on the new map lol.

Forum statistics

Threads
106,035
Messages
1,018,455
Members
137,821
Latest member
Capterson
Top