How to Update Outdated Shake Effect
Posted: Tue Apr 09, 2024 9:46 pm
My game used to use the Shake Effect in the outdated Ren'Py cookbook (found here https://www.renpy.org/wiki/renpy/doc/co ... ake_effect ) and with the new updates with the new Position type variable, is it at all possible to receive some help with updating this Effect's code to where I would not need to include the "define config.mixed_position = False" line typically required for fixing this?
It seems to be tied to trying to use xpos and ypos (now the new Position variable) in a math calculation when it's expecting an integer for this portion of the code
nx = xpos + (1.0-t) * self.dist * (renpy.random.random()*2-1)
ny = ypos + (1.0-t) * self.dist * (renpy.random.random()*2-1)
It seems to be tied to trying to use xpos and ypos (now the new Position variable) in a math calculation when it's expecting an integer for this portion of the code
nx = xpos + (1.0-t) * self.dist * (renpy.random.random()*2-1)
ny = ypos + (1.0-t) * self.dist * (renpy.random.random()*2-1)