I'm finding myself needing to know the location of a pictures X coordinate and store it into a variable.
I had tried $gameScreen.picture(n).x;
It doesn't crash, but if I print the variable to a message box it just prints out the function.
Is what I want possible?
Edit: I.E I would like to replace a picture with a new one, however the picture is constantly moving, so I need a way to find it and replace it rather than resetting it's position
If it's printing out a function, you should probably run it as a function. Basically a lot of the data are exposed through getters, which are functions that retrieve the values you need for you.
You can just do $gameScreen.picture(n)._pictureName = "new picture name" instead of having to pass in all the arguments again.
There would already have to be a picture there. Do you have any plugins that modify pictures? Can you show me the script call? Don't put the extension as part of the name - if your file is NewPicture.png then just put NewPicture
Yes, I had made sure the pictures were already there. The only Plugin I use is a Cache Preloader which I doesn't edit pictures.
I literally had an event with a wait time of 500 (To make sure all pictures were ready) and put ;
$gameScreen.picture(7)._pictureName = "Blood_Moon_Ripple_1"
It's not _pictureName, but only _name.
If you want to learn scripting by going through the files, I would recommend starting with Game_Interpreter in rpg_objects.js. This class handles the processing behind all the event commands. Find an event command you want to "look behind the scenes" with, and search for that exact text in that file. You will see what the engine does when you tell it to execute that event command.