Due to the many pictures I'm going to be showing, they are going to be in either position 1, or position 2. Now I could create a conditional branch that checks if it's position 1, or position 2, and show all of the correct pictures. But that's a tedious task (copying everything and changing only the picture number, for like a 100 pictures).
So basically I'm asking if it's possible to show a picture with a number that's based on a variable?
If variable 1 is 1, then Picture Number is X. If variable 1 is 2, then Picture Number is Y etc.
Oh my god that is a nice question, i never thought on that, at least this could be done via plugins, is not possible with events, the solution is precious, this is going to be cool if someone go with the answer,
Sure, you could use the script call for showing a picture in conjunction with variables.
// (pictureId, name, origin, x, y, scaleX, scaleY, opacity, blendMode)
$gameScreen.showPicture($gameVariables.value(25), 'file-name', 0, 0, 0, 100, 100, 255, 0);
At least, I think that is what you are after. I'm not quite sure how everything is lined up in the event/events.
You can replace the "Show Picture" command with a single script call:
$gameScreen.showPicture(pictureId, name, origin, x, y, scaleX, scaleY, opacity, blendMode)
You can use it like this:
$gameScreen.showPicture($gameVariables.value(1), 'picture_name', 0, x, y, 100, 100, 255, 0);
Edit: Ninja'ed
Thanks guys!
When typing in the picture name, does it end with the file extension? So "picturename.png" or just "picturename"?
Is there anyway to show different pictures based on the variable with this script call? or do I have to setup a conditional branch?
For instance, if the variable is =1 could it show an image named "picture1" automatically on the script call, or if the variable is =2, it would show "picture2".
Basically, have it read the variable and show a picture based on the number in that variable?
dang it. Thanks. quick question: do I copy everything in that box? even the words "picture Id" and "picture name"?
Nope, that's just a reference.