Using variables with Yanfly message codes \nw[id] \na[id] etc.

DGC

Villager
Member
Joined
Apr 19, 2019
Messages
6
Reaction score
2
First Language
English
Primarily Uses
RMMV
I have a questions about message codes, and I hope I'm asking in the right place. I know that \nw[place id# here] will show the weapon with that exact id, but what if you want to show a weapon id that is stored in a variable? Any suggestions on how to best achieve this? I've tried a few things, but no luck yet. Sorry if this is a dumb question.
Yanfly's message core for MV

I was thinking something like

\nw[$gameVariables.value(346)] but this of course doesn't work
 

caethyril

^_^
Veteran
Joined
Feb 21, 2018
Messages
2,088
Reaction score
1,508
First Language
EN
Primarily Uses
RMMZ
Have you tried using the variable message code, \v[x]? E.g. to use the value of variable ID 12:
Code:
\nw[\v[12]]
 
  • Like
Reactions: DGC

DGC

Villager
Member
Joined
Apr 19, 2019
Messages
6
Reaction score
2
First Language
English
Primarily Uses
RMMV
Have you tried using the variable message code, \v[x]? E.g. to use the value of variable ID 12:
Code:
\nw[\v[12]]
I should have thought of that der! That worked perfectly thank you! It makes since now that I see it.
 

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

Latest Threads

Latest Posts

Latest Profile Posts

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.
Do you Find Tilesetting or Looking for Tilesets/Plugins more fun? Personally I like making my tileset for my Game (Cretaceous Park TM) xD
How many parameters is 'too many'??

Forum statistics

Threads
105,863
Messages
1,017,053
Members
137,571
Latest member
grr
Top