[RMXP] MAKE VARIABLES FOLLOW PLAYER
Posts
Pages:
1
I was coding a cave system where the player uses a lantern to navigate a cave. I had two switches and the variable Player X = Player's Map X and Player Y = Player's Map Y. The only problem is that when the picture turns on, it doesn't follow the player's movements and stays stationary in one spot. The event however does follow the player instead.
What do I do now?
What do I do now?
If you are using the actual Show Picture command to display the lantern's light radius, this is what you'll want to do:
Create a parallel process event that saves the player's coordinates as you described, but have it not track the player's map X and map Y, but their screen X and screen Y instead. Then add the Move Picture command to move the picture for the lantern radius to those coordinates over the time of 1 frame. Insert a 1 frame Wait at the end, and it should work.
If you actually want an event to follow the player as well, you'll have to do that seperately via tracking the map coordinates in addition, just like you've been doing before.
I hope this helps. Good luck!
Create a parallel process event that saves the player's coordinates as you described, but have it not track the player's map X and map Y, but their screen X and screen Y instead. Then add the Move Picture command to move the picture for the lantern radius to those coordinates over the time of 1 frame. Insert a 1 frame Wait at the end, and it should work.
If you actually want an event to follow the player as well, you'll have to do that seperately via tracking the map coordinates in addition, just like you've been doing before.
I hope this helps. Good luck!
Pages:
1














