$gameScreen._pictures[1].x; Not working . Help

Hi guys !


Why is this code not working ???


XXX = $gameScreen._pictures[54].x;
YYY = $gameScreen._pictures[54].y;
$gameVariables.setValue(1, XXX);
$gameVariables.setValue(2, YYY);





I would like to get the coordinates, X and Y, an image has the screenshot.
You're missing an underscore:


$gameScreen._pictures[1]._x


Try console.log(window) and from there you'll see everything in your game and you can gradually see how to reach any information with script calls.
You're missing an underscore:



$gameScreen._pictures[1]._x


Try console.log(window) and from there you'll see everything in your game and you can gradually see how to reach any information with script calls.

Tank for the consol.log tricks


The code work now

Original thread: https://forums.rpgmakerweb.com/threads/gamescreen-_pictures-1-x-not-working-help.64544/