How to change the opacity of an picture for each input number

I want change the opacity of an picute for each input number
For example,I enter value in input number as 100 then opacity of picture will change to value 100,I enter value in input number as 1 then opacity of picture will change to value 1,I enter value in input number as 45 then opacity of picture will change to value 45
How can i do it?
Sorry for my bad english
You could do this with a LOT of Conditional Branch commands, but I'd suggest a Script command instead, e.g.

var pic = $gameScreen.picture(2); pic._targetOpacity = $gameVariables.value(3); pic._duration = Math.max(pic._duration, 1);
I.e. set the target opacity of picture ID 2 to the value of variable ID 3, then set the picture's "move duration" to its current duration or 1 frame, whichever is longer.
You could do this with a LOT of Conditional Branch commands, but I'd suggest a Script command instead, e.g.

var pic = $gameScreen.picture(2); pic._targetOpacity = $gameVariables.value(3); pic._duration = Math.max(pic._duration, 1);

I.e. set the target opacity of picture ID 2 to the value of variable ID 3, then set the picture's "move duration" to its current duration or 1 frame, whichever is longer.
Sorry if i mean picture ,not image.For example: I have two picture,named 1,2,3 .I want image 1,2 show.Image 3 show and change opacity when use input number.I try to show all picture use show picture .Then I added input number with variable named y and 3 digit,but it doesn't work.How can i do it?
Yes. Like I said, my example sets the opacity of picture ID 2 to the value of variable ID 3. You can change the numbers for your situation: picture ID 3 and the variable ID you are using for the number input.

Here's the event I used to test it:

◆Show Picture:#1, icon, Upper Left (0,0), (100%,100%), 255, Normal ◆Control Variables:#0031 Input = 255 ◆Loop ◆Text:None, Window, Bottom : :Enter new opacity value: ◆Input Number:Input, 3 digits ◆Script:var pic = $gameScreen.picture(1); : :pic._targetOpacity = $gameVariables.value(31); : :pic._duration = Math.max(pic._duration, 1); ◆Text:None, Window, Bottom : :Picture 1 opacity set to \v[31]. : :Go again? ◆Show Choices:Yes, No (Window, Right, #1, #2) :When Yes ◆ :When No ◆Break Loop ◆ :End ◆ :Repeat Above ◆Erase Picture:#1
It works for me. If you're having trouble, maybe share some screenshots of your event to show what you're doing?
Yes. Like I said, my example sets the opacity of picture ID 2 to the value of variable ID 3. You can change the numbers for your situation: picture ID 3 and the variable ID you are using for the number input.

Here's the event I used to test it:

◆Show Picture:#1, icon, Upper Left (0,0), (100%,100%), 255, Normal ◆Control Variables:#0031 Input = 255 ◆Loop ◆Text:None, Window, Bottom : :Enter new opacity value: ◆Input Number:Input, 3 digits ◆Script:var pic = $gameScreen.picture(1); : :pic._targetOpacity = $gameVariables.value(31); : :pic._duration = Math.max(pic._duration, 1); ◆Text:None, Window, Bottom : :Picture 1 opacity set to \v[31]. : :Go again? ◆Show Choices:Yes, No (Window, Right, #1, #2) :When Yes ◆ :When No ◆Break Loop ◆ :End ◆ :Repeat Above ◆Erase Picture:#1

It works for me. If you're having trouble, maybe share some screenshots of your event to show what you're doing?
I want to ask one more question.Now i want create a picture can clickable.When I click picture,it will show other picture.How can i do it?
You probably want a plugin like the following:

Original thread: https://forums.rpgmakerweb.com/threads/how-to-change-the-opacity-of-an-picture-for-each-input-number.152169/