Printing a variable in the console. $game_variables not recognised.

Joined
Sep 28, 2019
Messages
18
Reaction score
7
First Language
English
Primarily Uses
RMMV
I'm trying to read some variables in the console, using the following script command:

console.log("Logging variable 2. Value is " + $game_variables[2]);

On triggering the script, I get 'ReferenceError: $game_variables is not defined".

Having done a little searching, I haven't found another way to access game variables. It seems to be either '\v' in a text window or $game_variables in scripts.
If anybody has any idea how to read the switch states, variables etc. in the console, I'd appreciate your sage advice!
 

gstv87

Veteran
Veteran
Joined
Oct 20, 2015
Messages
2,149
Reaction score
1,115
First Language
Spanish
Primarily Uses
RMVXA
$gameVariables.

$gameVariables.value(index)
 

caethyril

^_^
Veteran
Joined
Feb 21, 2018
Messages
1,660
Reaction score
1,111
First Language
EN
Primarily Uses
RMMV
Yea, $game_variables is what it was in VX Ace (maybe XP as well).

Also, in case it comes in handy: there's a debug screen available by pressing F9 during playtest. :)
 

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

Latest Threads

Latest Posts

Latest Profile Posts

Yo Ho Ho... Time flies when you are having rum...

I'm rewatching Glee, just watched grilled cheesus.
Now I'm not sure if I'm hungry or I want to cry.
I just completed Ara Fell - completing the game unlocks an Epilogue. An interesting thing to possibly consider for my games.
I decided to try to make a mucha-styled artwork, and by now I've sunk more time in studies and sketches than I usually do in the whole thing. Fingers crossed it's worth it!
Since we have a lot of new faces, please be sure to read the forum rules under the Help tab at the top. Thanks!

Forum statistics

Threads
99,453
Messages
965,447
Members
131,063
Latest member
Quimey
Top