The RPG Maker Resource Kit

RMRK RPG Maker Creation => Requests => Script Request => Topic started by: Palsa on April 19, 2013, 03:17:34 AM

Title: [RMVX] Picture Changes Through Call Script
Post by: Palsa on April 19, 2013, 03:17:34 AM
I've searched around, and can't seem to find a solution or script for this, so I decided to just ask.
Would it be possible to make a script that allows the user to change part of a picture's settings, without changing any of the other settings, but through a call script command?
I'm not sure if there is a default call script that can be used to do this though; I've tried playing around with:
Call script: "screen.pictures[index].show(file_name, upperleft/center, x, y, x zoom, y zoom, opacity, blend type)"
But removing or leaving the other settings blank doesn't work.
The reason I'm asking, is because I'm making a common event that would load a character's picture, much like in a visual novel; the event would be for changing between different characters and their facial expressions.
I've already got a good idea of how I can accomplish this, but the command Show Picture sets the position and ID, among other things; and I'm hoping to use this common event when the portraits are in different locations, and I don't want it to interfere with the other settings.
I can make several common events for when the player is on the left, right or center of the screen; but that would make it a little more complicated then I'd like it to be.
Now that I think about it, I probably wouldn't even need the event if there were a script that could do this. ^_^;
Another thing that would add a lot, is if there were a way to change or swap the IDs of two pictures, for when a character appears behind or in front of another character.
Title: Re: [RMVX] Picture Changes Through Call Script
Post by: LiTTleDRAgo on May 27, 2013, 09:47:34 AM

Code: [Select]
class Game_Picture
  attr_accessor   :name                     
end

Call script: "screen.pictures[index].name = 'file_name' "
Title: Re: [RMVX] Picture Changes Through Call Script
Post by: Palsa on May 27, 2013, 10:16:35 PM
Thank you, it worked like a charm! ^_^