I want to show Pictures on the exact location of an event

Status
Not open for further replies.

RyanYe

RPG Game Lover
Veteran
Joined
Dec 31, 2020
Messages
82
Reaction score
12
First Language
English
Primarily Uses
RMMV
I want this happens:
--- A players steps onto an event
--- show a picture named: heart , on the exact location of the event, regardless of where that event was

But i don't know how to do this, i need some script call like this:
showPicture(1, "heart", x, y), where:
--- 1 is the id of the picture
--- heart is filename of picture
--- x,y is the event x and y on the map(or how to convert this to screenX and Y, i don't know)

help!!
 

ATT_Turan

Forewarner of the Black Wind
Veteran
Joined
Jul 2, 2014
Messages
756
Reaction score
414
First Language
English
Primarily Uses
RMMV
You don't need a script call, the regular event commands on tab 2 under Picture have a Show Picture button.
 

RyanYe

RPG Game Lover
Veteran
Joined
Dec 31, 2020
Messages
82
Reaction score
12
First Language
English
Primarily Uses
RMMV
You don't need a script call, the regular events command on tab 2 under Picture have a Show Picture button.

I have tried, but that doesn't allow me to show the picture on the event
the event location can be anywhere, so i cannot know the X and Y, i should calculate X,y Dynamically
 

ATT_Turan

Forewarner of the Black Wind
Veteran
Joined
Jul 2, 2014
Messages
756
Reaction score
414
First Language
English
Primarily Uses
RMMV
You use the Control Variables button to get (from the Game Data field) the player's X and Y position, then use those variables for the Show Picture.
 

RyanYe

RPG Game Lover
Veteran
Joined
Dec 31, 2020
Messages
82
Reaction score
12
First Language
English
Primarily Uses
RMMV
You use the Control Variables button to get (from the Game Data field) the player's X and Y position, then use those variables for the Show Picture.
i have tried too, but that X,Y is the X,Y coordinate, not ScreenX and ScreenY
the parameter of showing picture is screenX and Y , not coordinates

i don't know how to convert them, i even tried "*48", and that won't work properly either
 

ATT_Turan

Forewarner of the Black Wind
Veteran
Joined
Jul 2, 2014
Messages
756
Reaction score
414
First Language
English
Primarily Uses
RMMV
i have tried too, but that X,Y is the X,Y coordinate, not ScreenX and ScreenY
...they are both there in the exact same place. When you Control Variables to the Game Data of a Character, you have the choice of Map X/Y or Screen X/Y in the drop-down menu.

And just in case you really need it to be off the event, not the character, because they keep moving independently, I did a quick Google for "RPG Maker MV screen coordinates" and got this thread with the script calls:
 

RyanYe

RPG Game Lover
Veteran
Joined
Dec 31, 2020
Messages
82
Reaction score
12
First Language
English
Primarily Uses
RMMV
oh, i am sooooo dumb!
thank you so much!
now this topic can be closed!

and alternatively, i have found a script call way to do the same thing like this:

$gameScreen.showPicture(1, "heart", 1, $gameMap.event(this._eventId).screenX(), $gameMap.event(this._eventId).screenY(), 100, 100, 255, 0)

now this topic can be closed!
 

Shaz

Global Moderators
Global Mod
Joined
Mar 2, 2012
Messages
41,908
Reaction score
14,548
First Language
English
Primarily Uses
RMMV

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.



When you need a topic closed, please use the Report button so the mods are aware of it. We do not look at every post in every thread, so could easily miss a comment saying it can be closed.
 
Status
Not open for further replies.

Latest Threads

Latest Profile Posts

oddly enough, at this point... 3 major things have kept me from porting my project to MZ... animations, and that's mainly because they don't match the artstyle of my game. and two... I NEED a YED Sideview Battler like plugin and I have yet to see one. 3rd, I don't have the money for all the stuff I need plugin wise. and I already have it on MV... lol
Generally speaking, would there be interest in some form of tutorial regarding general project management? I see there are a lot of indie/self-taught devs around here, and looking back i feel like there was a lack of resources on how to properly manage a project that might take several years to finish
I've been working on some ABS team A.I. for 'A New Suburbia', and thought I'd share.

I'm generally quite please although the AI is a little grenade heavy right now :rolleyes: - Sneaking and stalking next! Please excuse the terrible map... it was just for ease of viewing!
Voting for the second round of the Map Madness Tournament is now live! Vote for your favorite in each matchup! https://forums.rpgmakerweb.com/index.php?forums/map-madness-2021-polls.187/
Just bought the Visustella All Waves bundle... Time to go IN!!

Forum statistics

Threads
110,577
Messages
1,054,356
Members
143,693
Latest member
speedylmao
Top