Indie Dev

Hello Guest!. Register a free account today to become a member! Once signed in, you'll be able to participate on this site by adding your own topics and posts, sell your games, upload content, as well as connect with other members through your own private inbox!

Need Help. How do you bind a rotating picture to the map?

Zarsla

Villager
Xy$
0.00
You put your rotating image into a parrllel process event, and then viola.
A parrllel process event for 1 map, a common parrllel process event for many maps.
 

CynicSyndrome

Towns Guard
Xy$
0.36
Let me rephrase: I an not currently using a single plugin for my project. I am trying to keep it that way. I got the picture to appear where on the map at the coordinates I want, and rotating correctly, but when the player walks to far or too close the picture moves with the player because the image is on the screen and not on the map. I tried parallel processes and local events. I'm pretty sure I'm just missing the obvious somewhere. I just need someone to point it out.
 

Xilefian

Adventurer
Xy$
0.00
Pictures don't support being anchored to the map scroll, you will have to use Javascript to implement this kind of functionality.

If you absolutely must avoid Plugins, then you can do the following event;


In this example, the picture is anchored to the top-left of the map 128 pixels from the left and 256 pixels from the top.

This will be 1 frame behind in movement, so it's not as good as what a Plugin will get you, but it works.

Screenshots (doesn't exactly show it in motion, but whatever);



Album: http://imgur.com/a/AWpdA

Javascript is used to offset the picture relative to the player's scroll position:
JavaScript:
$gamePlayer._realX * 48
$gamePlayer._realY * 48
48 is used as it's the size of a tile in default RPG Maker MV. A healthier thing to do is to use the $gameMap.tileWidth and $gameMap.tileHeight, but whatever floats your boat in this case (it makes no difference at all if you're sticking with 48px tiles).
 

Xilefian

Adventurer
Xy$
0.00
I love this! Thank you!! I'm gonna try it out with the 1 frame lag and see how it looks.
Would you mind telling me how this has gone for you? If my solution works fine and solves all your problems then you can mark it as the best answer.

I know that pictures anchored to the map is quite a highly requested thing, so it's very likely someone else would also want to know the answer to this question.
 

CynicSyndrome

Towns Guard
Xy$
0.36
oh I'm sorry I haven't really had much fee time to try and implement this solution into my project. it seems solid enough, and I think the slight lag might actually have a cool effect on what I have in mind. its basically the same thing I already tried but your script is a little different, probably better. I don't think this script is in the MV Scriptcall list. I've have added it to my library. do you know many other useful scripts that aren't on the list?
 
Top