Putting an icon into scripted text

Status
Not open for further replies.

Hahasea

Veteran
Veteran
Joined
Jul 4, 2019
Messages
151
Reaction score
17
First Language
English
Primarily Uses
RMMV
Hey guys, I'm wanting to put an icon next to a bit of text that originates from a script. Putting the regular \i[x] doesn't work, any idea how I might do this?

I've got this script assigned to control variable 39:
upload_2019-7-24_16-37-21.png
upload_2019-7-24_16-37-43.png

And some text that calls on 39 to name the season:
upload_2019-7-24_16-38-42.png

This is all linked into time common events, and it's all working fine. I like to put a seasonal icon next to the season name, but trying to add '\i[x] into the script just results in the text returning '0' instead of the name and icon. Any tips?
 

Attachments

caethyril

^_^
Veteran
Joined
Feb 21, 2018
Messages
2,091
Reaction score
1,508
First Language
EN
Primarily Uses
RMMZ
:kaohi: It's a quirk of the escape code parsing mechanics. All instances of "\" get replaced with "\x1b" before substituting variable values, so you'll need to use that in your variable assignment rather than a simple backslash. Try something like this~
Code:
['\x1bI[64]Summer','\x1bI[69]Autumn','\x1bI[65]Winter','\x1bI[67]Spring'][$gameVariables.value(10)]
 

slimmmeiske2

Little Red Riding Hood
Global Mod
Joined
Sep 6, 2012
Messages
7,842
Reaction score
5,225
First Language
Dutch
Primarily Uses
RMXP

This thread is being closed, due to being solved. If for some reason you would like this thread re-opened, please report this post and leave a message why. Thank you.

 
Status
Not open for further replies.

Users Who Are Viewing This Thread (Users: 0, Guests: 1)

Latest Threads

Latest Posts

Latest Profile Posts

People3_5 and People3_8 added!

so hopefully tomorrow i get to go home from the hospital i've been here for 5 days already and it's driving me mad. I miss my family like crazy but at least I get to use my own toiletries and my own clothes. My mom is coming to visit soon i can't wait to see her cause i miss her the most. :kaojoy:
Couple hours of work. Might use in my game as a secret find or something. Not sure. Fancy though no? :D
Holy stink, where have I been? Well, I started my temporary job this week. So less time to spend on game design... :(
Cartoonier cloud cover that better fits the art style, as well as (slightly) improved blending/fading... fading clouds when there are larger patterns is still somewhat abrupt for some reason.

Forum statistics

Threads
105,868
Messages
1,017,083
Members
137,583
Latest member
write2dgray
Top