How to dynamically change image size based off variable (?)

Hi! I was having a bit of trouble coming up with a way to make an image graphic change in size with connection to a variable (ex: if a player touches a button, variables are decreased by a certain amount, so will the image graphic). Is there a way of achieving this effect, similar to how image position can change based upon x and y values? Any help/advice is very much appreciated!
:LZSsmile:
parallel event with move picture so it refreshes constantly?

it can be done... it's just tricky to set up.
I don't remember the eventing capabilities... I'd just do it by code.
In whatever event you touch that changes the variables, you can also use a Move Picture command to change its scale.
you can refer to the MZ/MV Script call doc



reference:
$gameScreen.movePicture(pictureId, origin, x, y, scaleX, scaleY,opacity, blendMode, frames, easing);

example:
$gameScreen.movePicture(1, 1, 200, 150, $gameVariables.value(1), $gameVariables.value(2), 0, 0, 60);
Mh, there is no built-in "scale by variable" option, so you'll have to either use branches (good if you only have like, 2 or 3 different scales to choose from) or use a script call like Tino mentioned.

In case it helps, that list also has an example that changes only the scale of the picture:
JavaScript:
// [MZ] Scale picture 5 vertically to 200% over 60 frames
var pic = $gameScreen.picture(5);
pic._targetScaleY = 200;
pic._duration = pic._wholeDuration = 60;
Can be handy if you don't want to fetch the current position etc for the full movePicture script call.

Original thread: https://forums.rpgmakerweb.com/threads/how-to-dynamically-change-image-size-based-off-variable.174313/