Stop a rotating picture at a certain angle?

I need to stop a rotating picture once it gets to a certain angle; I've found solutions for VX Ace but of course they don't work with XP. Would anyone possibly be able to give me a hand?
I need to stop a rotating picture once it gets to a certain angle; I've found solutions for VX Ace but of course they don't work with XP. Would anyone possibly be able to give me a hand?
Below I give you the explanation, if you don't understand you can gard the attachment in which I show the commands. Otherwise, don't worry about asking: -D
I advise you to calculate in frames the time taken by the program to get to the position you want in the image, insert those frames in the "Wait" command in the evening, then delete the initial image and replace it with one in the same position where you made it disappear ( this happens in less than a second, so you shouldn't understand the actions taken)
Below I give you the explanation, if you don't understand you can gard the attachment in which I show the commands. Otherwise, don't worry about asking: -D
I advise you to calculate in frames the time taken by the program to get to the position you want in the image, insert those frames in the "Wait" command in the evening, then delete the initial image and replace it with one in the same position where you made it disappear ( this happens in less than a second, so you shouldn't understand the actions taken)
Thank you for such a quick response, it worked like a charm!
Thank you for such a quick response, it worked like a charm!
I am happy to have been helpful!
To be more precise, RPG maker calculate the picture rotation simply by halven the speed value then update it per frame.
rotation += value / 2

So if you want to rotate the picture at precisely 45 degree for example, just input speed 90 and wait 1 frame, then stop it with speed 0. It will stop exactly at 45 degree.
1588853773986.png


90 degree = speed 90 + wait for 2 frame.
180 degree = speed 90 + wait for 4 frame.
etc etc. The rest is just doing the math.

I was about to post my plugin that actually "rotate" the picture instead of "spin". But then I realize it's RMXP.

Original thread: https://forums.rpgmakerweb.com/threads/stop-a-rotating-picture-at-a-certain-angle.121189/