MZ How to call a picture with a script?

I am very JS-illiterate so bear with me.

I'm reading documentation right now and trying to figure out how to call a 'picture' with a script, as opposed to just a bitmap. I have found the ImageManager method that calls something from the pictures folder as a bitmap, but I want to be able to move that picture around using the methods pertaining to specifically pictures, and I'm not sure that I'll be able to do that to the bitmap that ImageManager outputs. (My eventual end goal is to create a title screen where multiple elements move in relation to the position of the mouse; a parallax. I don't want to do an evented title screen map if I don't have to, it seems like a sloppy way to do it.) How exactly do I call a picture through a script and then move the picture around? I'll probably just figure out the math for the parallax effect myself, and how to draw it when the title screen loads and whatnot.

Bonus points if you can tell me how to make the elements animate through a couple frames while still having the pictures move in relation to the mouse without snapping around or otherwise being choppy, but I understand if that's a pipe dream. (Maybe I'll install a gif support plugin.)
each maker has a pinned topic about the script equivalents of event commands.
please search for that for your maker, it contains the script equivalent of the commands like show picture, move picture and so on, including how to set the ID reference that can then be used in other commands to move that picture.
Not sure how I missed that, thank you!
Event commands are only operative on scenes that have the relevant sprites (e.g. Sprite_Picture) and infrastructure (e.g. Game_Screen & Game_Picture). That's not available on the title scene...but you don't need the entire RM Picture toolbox for what you're asking.

The MV/Z method ImageManager.loadPicture returns a Bitmap object, but as I think you've figured out, that's only an abstract container for a texture, not a display object in its own right. It is designed to be used as a texture for a Sprite object, which can then be moved, scaled, etc:
JavaScript:
// Create a new sprite & store it on `this`.
this._backgroundSprite1 = new Sprite(ImageManager.loadPicture("title1"));
// Display it as a child of `this`.
this.addChild(this._backgroundSprite1);
For a parallax-background-title plugin, you'd probably want to hook into a couple of methods:
  • Scene_Title.prototype.createBackground - create the sprites;
  • Scene_Title.prototype.update - update their positions each frame.

Alternatively, with an appropriate "title screen event" plugin: you'd just need a Parallel event that runs every frame, with a 1-frame duration (i.e. instant) Move Picture command using variable coordinates, for each layer of the parallax. Not sure why you'd think of that as "sloppy", but it'd certainly be easier.

In either case, screen coords of the most recent touch are TouchInput.x and TouchInput.y. (I don't recall whether those are mentioned on the Script Call List.)

Smoothing can be achieved by e.g. using a running average for the target coordinates, rather than simply setting the target equal to the current touch coords. That's just mathematics: if necessary it can be added after you get the main thing working, whether by pure JS or eventing.
Event commands are only operative on scenes that have the relevant sprites (e.g. Sprite_Picture) and infrastructure (e.g. Game_Screen & Game_Picture). That's not available on the title scene...but you don't need the entire RM Picture toolbox for what you're asking.

The MV/Z method ImageManager.loadPicture returns a Bitmap object, but as I think you've figured out, that's only an abstract container for a texture, not a display object in its own right. It is designed to be used as a texture for a Sprite object, which can then be moved, scaled, etc:
JavaScript:
// Create a new sprite & store it on `this`.
this._backgroundSprite1 = new Sprite(ImageManager.loadPicture("title1"));
// Display it as a child of `this`.
this.addChild(this._backgroundSprite1);
For a parallax-background-title plugin, you'd probably want to hook into a couple of methods:
  • Scene_Title.prototype.createBackground - create the sprites;
  • Scene_Title.prototype.update - update their positions each frame.

Alternatively, with an appropriate "title screen event" plugin: you'd just need a Parallel event that runs every frame, with a 1-frame duration (i.e. instant) Move Picture command using variable coordinates, for each layer of the parallax. Not sure why you'd think of that as "sloppy", but it'd certainly be easier.

In either case, screen coords of the most recent touch are TouchInput.x and TouchInput.y. (I don't recall whether those are mentioned on the Script Call List.)

Smoothing can be achieved by e.g. using a running average for the target coordinates, rather than simply setting the target equal to the current touch coords. That's just mathematics: if necessary it can be added after you get the main thing working, whether by pure JS or eventing.
Thank you for the help! I'll try to fiddle around with this once I have a better idea of what I'm doing.

I don't think I've ever seen a title screen event plugin that works with the "return to title" option, which is why I don't want to do it. I'd rather just modify the actual title screen, so there's no risk of players being thrown onto a default title screen. If you're suggesting I write my own title screen event plugin, I think that would be more difficult than just changing how the title screen works.
I don't think I've ever seen a title screen event plugin that works with the "return to title" option, which is why I don't want to do it.
Which ones have you tried that didn't work correctly?

I've only looked at a couple for MV, and they all did that fine. If you have a specific one that didn't account for that in its code, it should be a trivial fix in the plugin and that's all you need to worry about.
Which ones have you tried that didn't work correctly?

I've only looked at a couple for MV, and they all did that fine. If you have a specific one that didn't account for that in its code, it should be a trivial fix in the plugin and that's all you need to worry about.
Do the MV ones still work? I was looking at MZ plugins.
Edit: Found the VisuStella one. I don't know how I missed that, maybe I was using the wrong search terms? Either way, it's probably a hell of a lot cheaper to code something myself...
Do the MV ones still work?
Have you tried? E.g.

Original thread: https://forums.rpgmakerweb.com/threads/how-to-call-a-picture-with-a-script.173407/