Hi everyone! This is my simple screen shake engine! It uses a single backpack-able sprite that calculates the camera offset frame-by-frame. To use it, simply drag the sprite into your own project, and add in the required simple movement code into each sprite that you want to be affected by the screen shake (likely all sprites apart from UI). Next, simply broadcast the screen shake and set its parameters to start it! The screen shake will work for all sprites that have the screen shake code added to them, even if they are moving. However, this does not work for the background. Since the position of the sprites is also being changed, any existing code relying on the sprite's position may not work, and I advise using extra variables for the sprite's real position if that is the case.
The screen shake engine has been recoded from Godot into Scratch! The original was made by Mostly Mad Productions on Youtube.