Is there a way to "show picture" via a script call?

EthanFox

Veteran
Veteran
Joined
Oct 15, 2018
Messages
411
Reaction score
320
First Language
English
Primarily Uses
RMMV
To explain what I want to do; I want to write a Show Picture command, where I can do this (bit of pseudo-code here):

ShowPicture("Image_",integerVariable,"_angry.png",UpperLeft,1280,0,100%,100%,255,Normal)

The key part of this is that I have a variable number; I want to run this.

It's to avoid having to write a length series of IF statements, i.e. if it's 1, pick this image, if it's 2, pick this image...

Hopefully that makes sense. Is this possible?
 

Dopan

Veteran
Veteran
Joined
Mar 27, 2020
Messages
291
Reaction score
81
First Language
German
Primarily Uses
RMMV
Im a noob with JS myself and im not sure if i understood all of your Question(no idea about the variable part),..but i think this should help..

Code:
$gameScreen.showPicture(pictureId, name, origin, x, y, scaleX, scaleY, opacity, blendMode)
i took this code from here:
- Usefull Scriptcalls Info (Page is not made by me)
- alternative Scriptcall List (Page is not made by me)
 

EthanFox

Veteran
Veteran
Joined
Oct 15, 2018
Messages
411
Reaction score
320
First Language
English
Primarily Uses
RMMV
Im a noob with JS myself and im not sure if i understood all of your Question(no idea about the variable part),..but i think this should help..

Code:
$gameScreen.showPicture(pictureId, name, origin, x, y, scaleX, scaleY, opacity, blendMode)
i took this code from here:
- Usefull Scriptcalls Info (Page is not made by me)
- alternative Scriptcall List (Page is not made by me)
Thanks Dopan! That looks like it would work.

Can some JS wizard tell me (1) how I reference a variable, (2) how do I cast an int to a string and (3) how do I concatenate it so I can find the image using it?
 

EthanFox

Veteran
Veteran
Joined
Oct 15, 2018
Messages
411
Reaction score
320
First Language
English
Primarily Uses
RMMV
Please close; I was googling and managed to figure it out.
 

Kes

Veteran
Veteran
Joined
Aug 3, 2012
Messages
22,281
Reaction score
11,687
First Language
English
Primarily Uses
RMVXA
@EthanFox If you want a thread closed, just Report your post and ask for it to be closed. Mods may not see a post but they will see a Report.

But before you do that, it might be kind to edit your post with your solution so that if anyone else has the same problem they will know what to do.
 

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

Latest Threads

Latest Posts

Latest Profile Posts

Ami
--- Currency ---

Hero: This city cannot accept Gold to buy the items.
Merchant: You can exchange Gold into TC,depending the rate of TC this time.
Hero: Really? Then,i want to exchange 999999999G.
Merchant: Let's see……Wait a second,are you Cheating again?
Hero: Hell No!!! I earn it with myself!!!
There's always a time when you're super excited to create something but you already have no energy left. :I
I think of all the effects in my game, the light passing through fog has got to be my favorite....

...Also I spent all day trying to figure out how I had suddenly messed it up and made it start dropping frames like crazy. So I had all day to look at it... mocking me... with it's previous 60fps reduced to 30fps... At least it's fixed now.
Dalph wrote on slimmmeiske2's profile.
Slimmm, we should team one day and make "Reid in Wonderland" or "Aluxes in boots".

Forum statistics

Threads
103,479
Messages
999,643
Members
135,027
Latest member
Weaversenpai
Top