Rotating Picture in Battle

I have a common event to rotate a picture and it uses the following command:

$gameScreen._pictures[12]._angle = $gameVariables.value(7);

I recently tested out the command in a battle and the image won't rotate. It works just fine when I call it up outside of battle, but in battle it just sits there. Is the call "gameScreen" the wrong one? Is there a different command I need to use to make it work in combat?
Try adding +100 to the picture ID, as in, type 112 instead of 12.

I don't know why it does that, but that's what I saw when I tested it:

For Picture #1, outside of battle, this worked:
$gameScreen._pictures[1]._angle = 30;
In battle, this worked:
$gameScreen._pictures[101]._angle = 30;

I tested it with different picture IDs, too (12 and 112, 98 and 198, 5 and 105, etc).

If that doesn't work, have you tried the "Rotate Picture" event?
Try adding +100 to the picture ID, as in, type 112 instead of 12.

I don't know why it does that, but that's what I saw when I tested it:

For Picture #1, outside of battle, this worked:
$gameScreen._pictures[1]._angle = 30;
In battle, this worked:
$gameScreen._pictures[101]._angle = 30;

I tested it with different picture IDs, too (12 and 112, 98 and 198, 5 and 105, etc).

If that doesn't work, have you tried the "Rotate Picture" event?
Dude, why does that work? Haha. Thank you very much. I added 100 and now the event works just fine.

My backup was to use the "Rotate Picture" event, but the way I have it set up is a loop where it rotates 1 degree every loop. Depending on when you click the button you get different outcomes. So the rotate picture would have meant matching a timer up to the rotation. I could figure it out through trial and error eventually, but this way is much better for me.

Thank you for the help. I'm still blown away that adding 100 to the number makes it work in combat.
Typically you'd get the picture object using the accessor method, e.g. $gameScreen.picture(12). This handles the offset for you.

Battle and map pictures are stored separately, because the engine clears all battle pictures at the start of every battle.

Rotate Picture speed scales linearly: +1 speed means +1/2 degree clockwise per frame. So it shouldn't be too difficult to just use the event command, if you want that.

Original thread: https://forums.rpgmakerweb.com/threads/rotating-picture-in-battle.153543/