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

Veteran
Veteran
Joined
Jul 1, 2014
Messages
596
Reaction score
210
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 Profile Posts

Stressed and sleep deprived these days.:LZYangry:
TSR
One last screen shot for the weekend. An interior map for a change...
May you all have a nice week.Capture d’écran, le 2023-05-26 à 09.19.06.png
I've been working furiously on a small demo slice. But with King Slime so busy assets have been slow to form. No matter! I've got the demo for rpgmaker MZ and I'm using the 20 days to make a short and sweet demo game of fighting alongside your rival/boyfriend hehe Kind of like a mini challenge to myself
Yes my images are back ^^, hopefully they won't disappear again.:kaoangry:

Forum statistics

Threads
131,490
Messages
1,220,263
Members
173,224
Latest member
ZecaVn
Top