UI permanently altering position after enough screenshake

Hello!

My UI appears to be permanently changing position after screenshake; the first image is before and the second is after.


Do you just position them as is?
You can either use the anchor behavior on your UI elements, or if you have events that move them around, save their x and y positions in object variables and reposition them accordingly after a screen shake.

Can you post a screenshot of your events? I’m not familiar with the extension but I’m wondering if triggering it while it’s still running could reset the location. It could also be a rounding error. How long does the UI shake?

I’ve already tried adding a cooldown so that you can’t interrupt the screenshake, though to no avail. The shaking lasts for about 0.1 seconds. Every time the screen shakes the UI moves slightly. Even the player character does, though their position is reset to their original once the UI is closed.

I tried testing it and there’s definitely an issue. I had it display the camera border left and top. For me, the top remained at 0 but the left would occasionally go to -5.68… It always seemed to be the same number. It happened without interruption.

Huh…any ideas on how to fix it? I’ve never ran into this issue before while using this extension.

IDKW but for me if the left, top position wasn’t 0,0 it would only ever be off in the left not top. It was always that long number although, sometimes it was positive and other times negative.

You could submit a bug report through the extensions info page. (the screen that open when you click the extension name)

I personally wouldn’t trust it. You could reset the camera position afterwards but if there’s a flaw in the extension then there could be random issues. Resetting the camera could cause a larger jump.

You could try to create your own screen shake or maybe there’s another extension. You could shake the objects instead of the screen.

Scratch what it said. I don’t think I’ve been able to reproduce your issue.

It turns out the number I’m getting is basically 0. It’s the whole e-14 at the end. That’s just a rounding error and insignificant.

Eureka. I just tested it using a wait event before it. For some reason that’s the issue. It’s not compatible with wait.

Maybe you could use a timer instead. Or trigger the shake in a seperate event.

In your list of events

Wait .3
Set ShakeScreen to True

If ShakeScreen is true
Set ShakeScreen to false
Shake screen
Do the other things

2 Likes

Aw hell yeah man! Thank you so much!!!

1 Like

I don’t know how wait actions work internally. The shake function uses pre and post events. I’m guessing that the events after a wait are run differently than they would normally so it’s throwing off the sequence of events or expected sequence.

Actions triggered by the wait action are indeed executed at the beginning of the frame before anything else.

Would that affect an extension like the shake?