Image location

leoroura

Veteran
Veteran
Joined
Feb 14, 2017
Messages
32
Reaction score
5
First Language
English
Primarily Uses
RMMV
Hello everybody! I have tried different ways to approach this subject, i really hope anybody can give me a clue because i'm stuck on my game x.x So any kind of help would be appreciated!

What i want to do is figure out a way to translate an image's XY to a variable location. How?
For example, i have a gold coin icon and i want it to appear next to a number which holds a variable to tell how much gold i have at the moment. The number may move during cutscenes or by any other reason. So i want the gold coin to translate with the number, at the same time.

Is it possible to do something like this?

Thank you all in advance!
 

ultimagicka

Veteran
Veteran
Joined
Oct 15, 2012
Messages
38
Reaction score
17
First Language
English
Primarily Uses
RMMV
I would suggest looking inside the Window and Scene Js files to see how the engine displays the Gold_Window, then you could just create your own instance of it anywhere you want. Good luck!
 

Andar

Veteran
Veteran
Joined
Mar 5, 2013
Messages
31,821
Reaction score
7,887
First Language
German
Primarily Uses
RMMV
Yes, it can be done - but not the way you described.

Variables have no screen coordinate. You're using something to display a variables value on the screen, either a hud plugin or an event or something else.
You need to read the display coordinates of whatever you're using for that display and the recalculate that into tthe correct values for the show picture.

If you need help with that, you first have to tell us what causes the variable display.
 

leoroura

Veteran
Veteran
Joined
Feb 14, 2017
Messages
32
Reaction score
5
First Language
English
Primarily Uses
RMMV
Thank you for your replies!
Yes, it can be done - but not the way you described.

Variables have no screen coordinate. You're using something to display a variables value on the screen, either a hud plugin or an event or something else.
You need to read the display coordinates of whatever you're using for that display and the recalculate that into tthe correct values for the show picture.

If you need help with that, you first have to tell us what causes the variable display.

I am using SumRndmDde's Hud Maker. Basically it's a plugin with an ingame tool to create a personalized hud. Browsing my game folders i found a file created by the plugin inside my Data folder called "MapHUD.json" and this is the information of the exact bar i'm talking about:

[{"type":"Gauge","Cur. Value":"$gameParty.leader().mp","Max Value":"$gameParty.leader().mmp","Condition":"","Layer":"1","Width":"422","Height":"20","Style":"left","Color 1":"#fcf1cd","Color 1 Alpha":"255","Color 2":"#f5d563","Color 2 Alpha":"255","Back Color":"#666666","Color 4 Alpha":"255","Outline Size":"1","Outline Color":"#222222","Color 3 Alpha":"255","animateInfo":{"x":{"spd":0,"loop":false,"min":0,"max":0},"y":{"spd":0,"loop":false,"min":0,"max":0},"s":{"spd":0,"loop":false,"min":1,"max":1},"r":{"spd":0,"loop":false,"min":-90,"max":0}},"id":1,"x":785,"y":323}
 

Andar

Veteran
Veteran
Joined
Mar 5, 2013
Messages
31,821
Reaction score
7,887
First Language
German
Primarily Uses
RMMV
that info is only partially helpfull - you need access to the dynamic code of the placement during runtime and not the default data stored in the json.
after that you'll need to add the size of the display for the variable to get to the numbers for the positioning of the picture and then use show picture.
The info about the HUD-Maker means that there might be people using the same and already know that solution - I can't help anymore because I don't know the HUD-Maker.
 

leoroura

Veteran
Veteran
Joined
Feb 14, 2017
Messages
32
Reaction score
5
First Language
English
Primarily Uses
RMMV
Hm no luck with that, tried in the script forums for a couple days but no one seems to know :(
Thank you anyways good sir!
 

Latest Threads

Latest Posts

Latest Profile Posts

I'm moving on from RMXP finally. I've been stuck in a difficult decision between XP and MZ, and I've given up and moved on to MZ. Overall I'm really liking it, I wish tilesets were easier to setup like XP, but it's actually not that bad!
Have you ever gone full 'Ship of Theseus' while frankenspriting? Because I just did.
I saw my new eye doctor today, he reminds me of Satoru Iwata for some reason
I've been using a modified version of a script called Multiple Messages. It makes my text boxes look like a Mario & Luigi game! There is something about it that bothers me a little bit, but I shouldn't worry about that now.

Side note, Mist's walking animation is almost perfectly in sync with Loose Yourself by Eminem.
Starting work on some stuff for the community. Hopefully it will be fun, and useful to somebody.

Forum statistics

Threads
107,770
Messages
1,032,024
Members
139,914
Latest member
smudge
Top