Enable random image help

Hello,


I have set up an image gallery for a game using the MOG - Picture Gallery ACE (v2.0) script. The game is for a couple of friends of mine who are really into movies and I want the monsters to drop various movie posters.


I know how to make items for monsters to drop and I know how to use the enable_picture(x) script to turn the images on in the gallery. However, there are 318 images and I really don't want to have to make a separate consumable item for each poster. I know that I could also set up a common event using variables and conditional branches to assign each image to each of the "equals" numbers but again, that's a lot of conditional branches.


Does anyone perhaps know an easier way to go about making a single consumable item that randomly chooses a number between 1 and 318 and then enables that image number using the "enable_picture(x)"?


Thanks!
Control variables for a random number, and then reference the variable in place of x in the script command


It should look like this (untested, might contain spelling errors):


enable_picture($game_variables[Variable-ID]);


(replace the variable-ID with the number of the variable choosen, no leading zeros)
Perfect! Thank you so much!

Original thread: https://forums.rpgmakerweb.com/threads/enable-random-image-help.57818/