As the title says, I would like to know if there is a way to check for a frame during a picture’s rotation for a conditional statement. Basically, if a picture has rotated a certain amount of time in play test, I would want to check which frame it currently is on in its duration.
MZ Find x frame during picture rotation
Learning JavascriptWhen you say "frame," do you mean measuring the game's time in frames per second? Or do you mean the angle of rotation of the picture?
If you want to know how long it's been rotating, you could save the playtime to a variable when you issue the command to start rotating the picture; then, whenever you like, capture the current playtime again, subtract from the original, and do math as necessary to arrive at frames.
If you want to check the angle of the picture,
will give you the current rotation of picture ID (no leading zeros) in radians.
If you want to know how long it's been rotating, you could save the playtime to a variable when you issue the command to start rotating the picture; then, whenever you like, capture the current playtime again, subtract from the original, and do math as necessary to arrive at frames.
If you want to check the angle of the picture,
Code:
$gameScreen._pictures[ID]._angle
Either way would work, I’ll try these methods because knowing the angle is equally helpful, especially because i already saved the coordinate in which certain angles would match it on screen
Original thread: https://forums.rpgmakerweb.com/threads/find-x-frame-during-picture-rotation.174004/