SpaceTraveller97

Villager
Member
Joined
Feb 5, 2021
Messages
20
Reaction score
1
First Language
Spanish
Primarily Uses
RMMV
Well, as the title says i want to know if theres is a way to check pixel coords of the map, as the screen one but of the map.
Im making a Game that is mostly played with the mouse but when i scroll the map and click somewhere it's like clicking the same place before it scrolled.
I don't want grid ones because my game is pixel based.
 

Andar

Veteran
Veteran
Joined
Mar 5, 2013
Messages
33,670
Reaction score
8,489
First Language
German
Primarily Uses
RMMV
unfortunately the map is grid-based, that is why a lot of the pixel movement scripts/plugins have problems with event positions.

you'll basically need to use a full plugin for converting the map to pixel-base, that is not a simple check.
 

ImaginaryVillain

High Cultist of the Sporkle
Veteran
Joined
Jun 22, 2019
Messages
936
Reaction score
5,780
First Language
Absurdism
Primarily Uses
RMMZ
If you make use of QMovement (MV) or Luna QMovement (MZ)... You can call $gamePlayer.px and $gamePlayer.py to get their pixel cordinates on the map. Or of course $gameMap.event(this._eventId).px and $gameMap.event(this._eventId).py for an event.

It calculates it by taking the X/Y of a character and multiplying it by tilesize. Though of course the resultant number is only useful because the plugin itself gives it meaning. Still that's the math if you want to make your own plugin.
 

SpaceTraveller97

Villager
Member
Joined
Feb 5, 2021
Messages
20
Reaction score
1
First Language
Spanish
Primarily Uses
RMMV
If you make use of QMovement (MV) or Luna QMovement (MZ)... You can call $gamePlayer.px and $gamePlayer.py to get their pixel cordinates on the map. Or of course $gameMap.event(this._eventId).px and $gameMap.event(this._eventId).py for an event.

It calculates it by taking the X/Y of a character and multiplying it by tilesize. Though of course the resultant number is only useful because the plugin itself gives it meaning. Still that's the math if you want to make your own plugin.
The script i was looking for wasnt these but i found the one i need in that plugin code, thanks!
 

ShadowDragon

Realist
Veteran
Joined
Oct 8, 2018
Messages
4,401
Reaction score
1,679
First Language
Dutch
Primarily Uses
RMMV
you can check this plugin (which is a picture coordinates) little
plugin + event setup which can be found [here].

while it uses a bigger picture, you can create a 1x1 pixel or 10x10 and calculate
the way in picels you need.
 

Latest Threads

Latest Profile Posts

I might not participate in the Boss Battle contest after all... I have more important things to do, like Wishful Wanda. And of course the Dark Deception spinoff I plan to pitch, Demon Slayer.
Changed my avatar, goodbye Alan Sugar, hello George Carlin (one of my favorite human beings ever)
If you still don't subscribe our Polish channel please consider it :)
1.png
Who wants to see my review of the worst star wars movie? This movie has all the excitement of being on Jury Duty of the most boring case ever about trade negotiations.
A lot to learn to make a game. Can I handle it?

Forum statistics

Threads
115,171
Messages
1,087,801
Members
149,720
Latest member
Kirbyslasher
Top