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!
 

SkepsysD

Veteran
Veteran
Joined
Oct 15, 2012
Messages
43
Reaction score
20
First Language
English
Primarily Uses
RMMZ
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
37,657
Reaction score
10,364
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
37,657
Reaction score
10,364
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 Profile Posts

Me: *about to stalk someone's posts*
Forum: "This member limits who may view their full profile."
Me: *bummer*
Also forum: Advanced search > Posted by ...
1B77FB7E-3802-4179-BB2D-F390021512A6.jpeg
Starting a fly by the night dev studio. Anyone want in? Excellent working conditions with onsite lodging. LOL
OMG... I actually managed to recreate my "combat hotkeys" function in MV (eg. press 3 on the keyboard to summon an equip screen to change equipment midcombat).

And it works with Yanfly's Keyboard Config!?

I'm amazed things are working at all, to be frank.
This made me laugh, apparently YT automatically marks my streams as being about "I Wanna Be the Guy"... You know what YT? Wrong game.. but right message, I'll take it. :LZSlol:


i_wanna_be_the_villain.jpg

Forum statistics

Threads
128,529
Messages
1,195,243
Members
169,123
Latest member
Stalebread
Top