[SOLVED]PictureIDs for randomly generated images.

So I have a Control Variable that randomly picks one from 1-5 and 5 IF statements to go with it.

Each IF statement is supposed to show an image depending on what number was picked.

My question is, why do I need to have different PictureIDs when because of the IF statements, it will only show one picture among the 5 in the array?

I tried making them the same PictureIDs, and there’s a glitch where they just continue to reroll the variable non stop.
I tried making them the same PictureIDs, and there’s a glitch where they just continue to reroll the variable non stop.
Are you sure it's a glitch and not a logical error? Could you post your code/event page?
I don't think we can answer what might be wrong with your event code unless you show a picture of the event.
I don't think we can answer what might be wrong with your event code unless you show a picture of the event.
Are you sure it's a glitch and not a logical error? Could you post your code/event page?
Will post one in a bit!
I am using PictureCallCommon by Triacontane.
I have other plugins, but for this particular one, that's the one I'm using for the PluginCommands.

Screenshots 62 and 63 are using different IDs, they do work the way they're supposed to:
Rolling a number between 1-5, and choosing one from that to trigger one of the Conditional Branches.

Screenshots 58 and 59 uses the same IDs for each Conditional Branches, and it won't pick one, instead it will continuously reroll the numbers.

I also have a video on how they are in game: YoutubeLink
You don't show the end of the event - do you do something to turn it off? I see there's only one event page, so you don't set a self switch and go to a second blank page. Do you do an Erase Event or something?

Otherwise, Parallel events automatically loop and attempt to run every frame (60x per second), so that will absolutely cause problems.
You don't show the end of the event - do you do something to turn it off? I see there's only one event page, so you don't set a self switch and go to a second blank page. Do you do an Erase Event or something?

Otherwise, Parallel events automatically loop and attempt to run every frame (60x per second), so that will absolutely cause problems.
Oh sorry, I didn't show the end of the event because they're all the same, just the variable numbers change but inside it are all the same.

So I have to put an erase event on it?
The other one just picks one image in the array without having an erase event at the end.
Erase event will make whatever is on that page run once every time you enter the map. If you want to toggle when you run the commands on that page you would turn on self switch A at the end of the page and have the second event page blank with the self switch A checkbox checked. Then whenever you want to run the first page again (maybe never, so it only runs once ever), turn off self switch A.
The other one just picks one image in the array without having an erase event at the end.
I don't know what "the other one" looks like, so I can only tell you (from the instructions) what a parallel event does. It keeps running every frame until you shut it off or leave the map.

If that isn't what you want to happen, you need to either shut it off with another event page or an Erase Event, or you need to control it with Wait commands or something.

So I have to put an erase event on it?
You have to know what you want to happen and how events work.

I don't know what you want your event to be doing - all I know is that you almost certainly do not want it to be trying to display, move, and erase pictures every single frame.
I don't know what "the other one" looks like, so I can only tell you (from the instructions) what a parallel event does. It keeps running every frame until you shut it off or leave the map.

If that isn't what you want to happen, you need to either shut it off with another event page or an Erase Event, or you need to control it with Wait commands or something.


You have to know what you want to happen and how events work.

I don't know what you want your event to be doing - all I know is that you almost certainly do not want it to be trying to display, move, and erase pictures every single frame.
Erase event will make whatever is on that page run once every time you enter the map. If you want to toggle when you run the commands on that page you would turn on self switch A at the end of the page and have the second event page blank with the self switch A checkbox checked. Then whenever you want to run the first page again (maybe never, so it only runs once ever), turn off self switch A.
Thank you for the advice on using self switches and more pages. It works the way it should now!
And I can just use one PictureID!
Your event pages A-D are all exactly the same which makes me wonder why you have anything beyond A but I'm glad it works.
Your event pages A-D are all exactly the same which makes me wonder why you have anything beyond A but I'm glad it works.
They are generating different pictures but using the same pictureID.

Original thread: https://forums.rpgmakerweb.com/threads/solved-pictureids-for-randomly-generated-images.159072/