Image location

leoroura

Veteran
Veteran
Joined
Feb 14, 2017
Messages
32
Reaction score
4
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
30
Reaction score
14
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
30,401
Reaction score
7,222
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
4
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
30,401
Reaction score
7,222
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
4
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!
 

Users Who Are Viewing This Thread (Users: 0, Guests: 1)

Latest Threads

Latest Posts

Latest Profile Posts

Husband has roped me into playing one of his PSO2 characters. Productivity is now negative.
Tileset A is lava! Don't burn D:
as MZ come out what you guys think about.....Some particles engine :3c?
Who wants to sing this song with me?~

Decided to submit my games to the Monday Night Stream. Figured it might be a fun way to get some traction.

Forum statistics

Threads
100,704
Messages
978,547
Members
132,320
Latest member
LavaWave
Top