I'm looking to run a common event just once when the player moves.
The idea of what I want the event to do: when a player goes over a certain terrain tag I want to check for a specific key item, and if that item exists add a specific item to the player's inventory.
Right now the script works by checking the terrain tag ID. If it matches, good. If not, then it moves on. I put a 60 frame (1 second) wait so the script will only run once every 60 seconds. The one thing I don't like about it is a player can stay in one spot and the script will continue to run so they would be able to stock up on whatever items they receive.
I'm pretty sure I can figure out a way to limit it through checking coordinates and all that jazz, but it seems like it would be much easier to run certain scripts (like getting the player x and y) just once per step instead of continually checking it.
Thanks in advance for the help!
The idea of what I want the event to do: when a player goes over a certain terrain tag I want to check for a specific key item, and if that item exists add a specific item to the player's inventory.
Right now the script works by checking the terrain tag ID. If it matches, good. If not, then it moves on. I put a 60 frame (1 second) wait so the script will only run once every 60 seconds. The one thing I don't like about it is a player can stay in one spot and the script will continue to run so they would be able to stock up on whatever items they receive.
I'm pretty sure I can figure out a way to limit it through checking coordinates and all that jazz, but it seems like it would be much easier to run certain scripts (like getting the player x and y) just once per step instead of continually checking it.
Thanks in advance for the help!