Status
Not open for further replies.

hiddenone

Lurker Extraordinaire
Global Mod
Joined
Feb 19, 2014
Messages
2,587
Reaction score
5,482
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,587
Reaction score
5,482
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

Revamped the crew for my VN about thirty times. Only character that's stayed constant has been the fungus character. Guess it really grew on me...
I want to work on my reboot, but I don't have time to do it. ;_;
4y195n.png
big image so i posted it as a spoiler
Just a reminder to back your projects up. Do it now! :yamero:
If there was an award for best game dev procrastination, I'd say 'meh, I'll pick it up tomorrow' >_>
Honestly though, I've been staring at the same half-made map for a while now haha! Ahhh, I'm so tired of mapping!

Forum statistics

Threads
111,270
Messages
1,059,785
Members
144,567
Latest member
Sysce
Top