Status
Not open for further replies.

hiddenone

Lurker Extraordinaire
Global Mod
Joined
Feb 19, 2014
Messages
2,588
Reaction score
5,484
First Language
english
Primarily Uses
RMMZ
Hey all, thanks for taking the time to check out this thread. I'm looking for a plugin that gives me more options when it comes to choosing a picture's origin. The default lets us choose from the upper left and center of a picture, which is fine but I was hoping to use the bottom corners to make it easier to place busts at the edge of the screen. And once I thought about using the bottom corners as an origin, I thought that adding a few more could be possible too.
So instead of the two default origins like this:default picture origins.png
I'm hoping for a plugin that would let me pick from nine origin options like this:added picture origins.png

I found this code in the rmmz_sprites code that I think is what controls the default commands picture origin, but that's where my javascript knowledge ends. :rswt
Code:
Sprite_Picture.prototype.updateOrigin = function() {
    const picture = this.picture();
    if (picture.origin() === 0) {
        this.anchor.x = 0;
        this.anchor.y = 0;
    } else {
        this.anchor.x = 0.5;
        this.anchor.y = 0.5;
    }
};
I was thinking the plugin could use plugin commands to give those new origin options alongside the rest of the normal Show Picture and Move Picture details (the stuff like position, scale, blend, duration) so that's it's easier to use than needing to make sure a script call is written correctly each time.
I hope that's enough details to get someone started, but if you need more info let me know. Thanks in advance. :ptea:
 

hiddenone

Lurker Extraordinaire
Global Mod
Joined
Feb 19, 2014
Messages
2,588
Reaction score
5,484
First Language
english
Primarily Uses
RMMZ
@Eliaquim Thank you so much! It seems to be working perfectly, this is going to save me (and hopefully others) from having to do a lot of extra math to get pictures to show up in the right spots.
Now I just need to make the rest of the game...

This thread is being closed, due to being solved. If for some reason you would like this thread re-opened, please report this post and leave a message why. Thank you.

 
Status
Not open for further replies.

Latest Threads

Latest Profile Posts

After gathering, sorting out & reconsidering hundreds of enemy battlers over the last two das, finally my favorite part begins: Inventing names and lore for them all :D
I'm running a sale for Learn RPG Maker MV on Itch.io, can I compete with NSFW games earning goals?
Another Friday and another Zoom call that could have been an email. Working from home is awesome.
Finished with the semester; finally have some time to play around with MV :kaopride:
Started work on the fishing Mini-Game

Forum statistics

Threads
111,371
Messages
1,060,536
Members
144,698
Latest member
punisama
Top