MZ ShowPicture

I'm trying to show a picture inside the battleScene. I'm using this code inside a script:

$gameScreen.showPicture(11, $gameVariables.value(162).toString(), 1, 0, -50, 100, 100, 255, 0);

I verified the image name is correct and a string value. The script isn't executed and in the console when I enter it manually, it returns undefined. Any ideas on why is this happening or how to correctly implement the showPicture command?
I'd rather not make it with the event commands as it would require 24 conditionals inside a common event to make what I want to do.
The console returns undefined because the Game_Screen.showPicture() function doesn't return any result. This is normal.

Does it work if you use
Code:
$gameScreen.showPicture(11, $gameVariables.value(162).toString(), 0, 0, 0, 100, 100, 255, 0);
instead?

Currently, you are setting the origin to 1 (center of the image), and the y position to -50. If your image is less than 100 pixels high, it's possible you can't see it because it's rendered off screen.
Thanks for the reply, that didn't work. But I think there must be a plugin that makes this happen because now it doesn't work with the event command either (maybe is visustella battle core action sequence?).
Unfortunately I don't really know plugins other than the ones I write myself, so I can't really help with that.

The only thing I can say, is that if you execute a script in the DevTools console, you need to switch back to the game's window to see the changes of your effect. The game's execution is paused for as long as the window is out of focus.

I've also tried executing the above script in battle and it worked. If event commands don't work either, then it's possible a plugin broke it.

Original thread: https://forums.rpgmakerweb.com/threads/showpicture.142930/