Designate icon to display using a variable?

Hello, everyone.

I was trying to build something where I was counting on displaying an icon on the screen using the TextPicture default plugin. That plugin allows the use of \I[#id] to display the icon. Just like in the Show Text event command.

However, the icon to be displayed would not always be the same so I was trying to assign the icon number to a Variable and then use the Variable in the \I[#id].

For instance, \I[$gameVariables.value(10)]

However, this doesn't work.

I searched and saw something about using x1bi, but I couldn't figure out how to make that work either.

I did find one thread from 2021 that might indicate that you can't use a Variable with the Show Text event option for displaying the icon.

Does anyone know if that is true. Meaning that you must know the exact icon that you want to display and use that number, rather than use a Variable?

In my searching I did find threads where it seemed to be showing how to display an icon in a window. I will look at that more if there isn't a way to use a Variable to identify which icon you want to display.

Thanks!
have you trie the easiest variant?

\I[\V[Variable-ID]]

It depends on what plugin you're using, but that is how variables are accessed in show text.
have you trie the easiest variant?

\I[\V[Variable-ID]]

It depends on what plugin you're using, but that is how variables are accessed in show text.
DOH! Well, Son of a Biscuit Eater! Thanks, @Andar !

I tried all sorts of things, but I was missing the \V part. I was trying to use $gameVariables.value in its place. I still did it wrong multiple times, even with what you provided above, but I eventually figured it out and it works perfectly. \I[\V[438]]

And the funny/tragic thing is that I am pretty sure I used this before and I couldn't find where I used it and I couldn't find it by searching for a solution.

I was testing with the Show Text event command so I could then use the TextPicture plugin.

Thanks again! This will make what I am trying to do much easier. I was getting ready to do a lot of conditional branches.

Original thread: https://forums.rpgmakerweb.com/threads/designate-icon-to-display-using-a-variable.154516/