Image location

● ARCHIVED · READ-ONLY
Started by leoroura 6 posts View original ↗
  1. 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!
  2. 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!
  3. 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.
  4. Thank you for your replies!
    Andar said:
    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}
  5. 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.
  6. 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!