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

Jonforum

Veteran
Veteran
Joined
Mar 28, 2016
Messages
1,623
Reaction score
1,439
First Language
French
Primarily Uses
RMMV
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.
 

Astfgl66

Veteran
Veteran
Joined
Jan 5, 2016
Messages
722
Reaction score
578
First Language
French
Primarily Uses
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.
 

Jonforum

Veteran
Veteran
Joined
Mar 28, 2016
Messages
1,623
Reaction score
1,439
First Language
French
Primarily Uses
RMMV
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
 

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

Latest Threads

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,860
Messages
1,017,040
Members
137,569
Latest member
Shtelsky
Top