Image Offset for Sprites (Origin X and Y) in Code

I want an event to trigger that changes the Origin X for an object but not it’s actual X and Y.

Can that be accomplished from code or do I need to replicate the animations with second pair of origins? I personally would not like the latter approach.

There’s no offset for sprites, only for tiled sprite.

You could use the “Displacement” effect, with a displacement map that is all the same color.

Can you please elaborate? I am too thick to understand what that means.

https://wiki.gdevelop.io/gdevelop5/interface/scene-editor/layer-effects/#displacement

Why exactly do you need to offset the sprite without moving it? Maybe there’s a different way to accomplish this.

Hm… That will not work as crisply.

OK I will go the duplicate animation route.

I’m not sure what you mean by that. Displacement simply moves the destination of pixels. There would be no difference between an animation with everything shifted, and shifting the image via displacement.