Variable for display picture

Hi,

I just started to use RMMV. I'll buy it next month but I have already started working on it. I used older versions. I've never really use Ruby. Only by some few modifications.

Now I want to use Javascript to  simplify my event systems before the entire script.

In an event I do something like that :

Condition : If variable "picture" = 1

> Display picture "Mypicture1", x= variableX, y= variabley etc...

end

Condition : If variable "picture" = 2

> Display picture "Mypicture2", x= variableX, y= variabley etc...

end

and I do that 24 times. (I'm crazy and very patient :headshake:  ).

Before I ask my question here, I did some research. Tell me if I'm wrong

I want to display a picture. I call a script and I do something like that :

$gameScreen.showPicture(1, "Mypicture", 0, 50, 50, 100, 100, 255, normal)

I want also use a variable in the name of my picture (Mypicture1, Mypicture2, Mypicture3...) and for the position

$gameScreen.showPicture(1, "Mypicture{VARIABLE1}", 0, {VARIABLE2}, {VARIABLE3}, 100, 100, 255, normal)

How can I do ?

I use game variables $gameVariables(1) for the picture name, $gameVariables(2) for X, $gameVariables(3) for Y.

Please help me to learning .
I'm not sure if this answers your question, but you can assign to and read from game variables like this:

$gameVariables.setValue(1, 'my value');var myValue = $gameVariables.value(1);1 is the number of the variable.

Let me know if I completely missed the point of your question  🤣
You don't need to use game variables to determine all the values  for your picture on rmmv. For true, if you are aiming to make a plugin, you must do not use them too much, unless you really need them. Better than this, you can even don't use any of the $gameVariables at all in your game, just creating global varibales by "var nameof = x" on script calls, and checking it's values with "if (nameof  == x) {what happens}", change them by "nameof = value", call them by "nameof", etc... But you have to say exactly what you want to do if you want some help here.

There are very good tutorials avaliable on youtube for rmmv scrpitting. I'll indicate to you the SoulPoor's ones that I'm using to learn too. He makes very good videos about Java scriptting.

https://www.youtube.com/playlist?list=PLAhuV2yrS6nrkVwtEIjIC1isySa8l2F4h

Good luck. ^^
Let me know if I completely missed the point of your question
Is not exactly what I want to do.

I want to make a gauge with differents pictures (not only in lign).

If you know a script to extract event to text or html. My work explain better than me and my broken English. 😛

interface-relation.png


You don't need to use game variables to determine all the values  for your picture on rmmv.
I know that. I have a big system (all in event page and comon event). I want to try myself to translate with javascript (to learn) little part by little part. It is tooo big and for now I cant work all the system to make a complete plugin (too hard for me;_; ).

My system work but It's veeeryyyy big  and when I want to change something it is a crazy work (clic, clic, clic, copy, cut, paste, clic lcierjfzrjz😮  ) !

After much thought , I think I'll avoid the questions that will lose me more. I will work on the full plugin.
I use game variables $gameVariables(1) for the picture name, $gameVariables(2) for X, $gameVariables(3) for Y.
var name = $gameVariables.value(1), x = $gameVariables.value(2), $gameVariables.value(3);$gameScreen.showPicture(1, "Mypicture" + name, 0, x, y, 100, 100, 255, 0);I'm not really sure, what values to use for the blend mode (last parameter), but you can find that out, yourself.
I'm very happy cause I have found a very good tuto chain on Youtube. I have all ready found solution for my problem and I'm creating My full Custom Plugins game.


For the moment, I make my Title scene and many interface with specials stats add to the basic gameplay. I'll finish my system. I add some params to make it customizable and I'll publishing my work before the end of the month if I have time.


Thank You for all response and your help.

Original thread: https://forums.rpgmakerweb.com/threads/variable-for-display-picture.51752/