Way to check if a variable or sprite has updated/changed

Is there a way to do this? I am trying to make a teleport animation for a character in my game and to do this it needs to check if updated

1 Like

What do you mean updated/changed? Like the player’s state or something?

You can store an extra version of the variable you want to track and then constantly check if it’s still equal to the one that’s changing. If it’s ever not equal, you know the tracked variable has changed, so you run the code you want to run and then make sure to set the tracker variable to the tracked variable at the end.

1 Like

Licke a block/function that checks if a variable updates like

on variable updated