Solitary Confinement
Member
Hiya,
Instead of using an alarm and a variable check, I'd like to use a precise image_index value check. To do this, it'd be best if a multiple of image_speed could be determined and peg this in conjunction with the the target frame(s) once the frame of the animation where an action must execute, is reached.
Just as an example, if an animation has 12 frames (index 0 to 11), image_speed of 0.27, and the target frames are index 1 and index 6. Then I could have something similar to the following:
I have looked at the div and modulo functions in the manual but don't see how they would translate in this case. Is this possible?
Thanks in advance.
Instead of using an alarm and a variable check, I'd like to use a precise image_index value check. To do this, it'd be best if a multiple of image_speed could be determined and peg this in conjunction with the the target frame(s) once the frame of the animation where an action must execute, is reached.
Just as an example, if an animation has 12 frames (index 0 to 11), image_speed of 0.27, and the target frames are index 1 and index 6. Then I could have something similar to the following:
Code:
if (image_index==(multiple of 0.27 that is greater than or equal to 1)) //multiple in this case is 1.08 (0.27*4)
or (image_index==(multiple of 0.27 that is greater than or equal to 6)) //multiple is 6.21 (0.27*23)
{do stuff}
Thanks in advance.