sammc

Villager
Member
Joined
Apr 30, 2013
Messages
28
Reaction score
2
Primarily Uses
Hi,
I have a hiring pop up in my game that I would like to have different icons to be chosen for randomly. The images would be little faces.
1. Random Icon is chosen of a set of 20.
2. The number of the icon is stored in an array and referenced later for the hired agent.

The problem I'm facing using Yanfly's EvalText and \i[] is that when I put in code like this:
\i\evalText<<$gameVariable.value(200)[Math.random]>> the \i portion of the code just shows up as blank. I tried another method and evalText by Yanfly just doesn't work this way.

Is there some way to display an icon based on some code, so the icons shown are random?
 

Attachments

  • agentpic.png
    agentpic.png
    9.2 KB · Views: 14

xabileug

Regular
Regular
Joined
Jul 1, 2014
Messages
672
Reaction score
293
try this script call
$gameVariables.setValue(ID, Math.floor(Math.random() * maxRange));
then $gameVariable.value(ID)
 

sammc

Villager
Member
Joined
Apr 30, 2013
Messages
28
Reaction score
2
Primarily Uses
Hm, that doesn't answer the question; the icons themselves won't appear with that code call.
 

Latest Threads

Latest Posts

Latest Profile Posts

The X-Mas and ~ all ~ December long Calendar Project seems to bring my machine right to the limit. A very good oportunity to test what my pc can do. Or at which point I should decide to take a step back from filling the rendering program with assets.
The new grafics card and ram do their job well, that's for sure. My own early Christmas gifts were a good investment.
my laptop keyboard gave up, they keep glitching out, it seems like it's time to finally replace them, honestly surprised it lasted this long.
Tiny setback. Turns out my Title Screen image and one of my primary background & avatar images are AI Generated. Glad I went back and checked all my resource links. So I am in hot pursuit of replacement images. Which is fine since I was still missing some images that I need anyway.
Watching Vibrato Chain Battle System is too awesome! watch I wish had this gfx and animation skill to make such game!
Got drawn back by a notification about QPlugins. For those who want the MZ versions I was using, they're on my Github. https://github.com/ImaginaryVillain/QPlugins I literally don't care what you do with them, have fun! :LZSlol:

Meanwhile.. I'm glorying over these 550 new Victorian house models Epic gave me this month. See next post for examples....

Forum statistics

Threads
136,892
Messages
1,271,115
Members
180,670
Latest member
jakkapong
Top