Is there a way to change (zoom, opacity, delete, ...) all active pictures?

Is there a way to change (zoom, opacity, delete, ...) all active pictures? For example with a script call? I want to change the opacity of all existing active pictures on a map, but it depends what pictures are active (picture number). So if there is a way to change just every picture currently active, that would be really helpful!
Code:
!!$gameScreen.picture(id)
returns if there's a Picture with this id.

So to update multiple pictures, you can do this script call

Code:
for (let id = 1; id < 51; id++) {
    const picture = $gameScreen.picture(id);
    if (picture) {
        picture._targetOpacity = 150;
       
        // other actions could be ..
        // picture._targetX = 200;
        // picture._targetScaleX = 100;
       
        picture._duration = 60;
    }
}
@Aerosys Thanks! This works in a script call?
Yes. Tell me if it works for you 🙂
@Aerosys It actually didn't when I tried it like this:

Screenshot 2021-01-05 at 18.41.00.png


No errors or anything, the opacity just didn't change 😅
I just tried in on my machine and it worked for me. Is your script maybe not called or is there another event interupting?
PS: targetOpacity = 0 means that the picture is not visible anymore if you haven't known yet 😛
I know 🙂 i have a lot of other events etc going on so might be something there that hinders. Ill try on a clean project and see what causes it. Thanks for the help!
@Aerosys So after some testing, I found out that as soon as you add a teleport event after the script, it doesn't work anymore. Doesn't matter different map or same map etc. Tried it in a fresh project too. Any idea how I could fix that? 😅
No sorry. I looked up the function to update pictures and provided it to you, that's all what I did. So it's not really custom code. I have no clue why it raises such issues :/

Original thread: https://forums.rpgmakerweb.com/threads/is-there-a-way-to-change-zoom-opacity-delete-all-active-pictures.131849/