I'm playing around with various functions and events for contact-based battles, and I'm wondering, is there a way to set up an Event to give an enemy a sort of "magnetic" effect, where either using a timer or a frame-waiting sequence, at regular intervals, the player will be forced to step towards an specific event location? Ideally, this would be for an Event that is also moving, but I could probably make my idea work even if it could be done by having the magnetic event as something stationary and independent Events moving towards the player.
Move actors towards event?
RPG Maker VXAce SupportWell theoretically you can define 4 variables:
-x position variable for your player
-y position variable for your player
-x position variable for your event
-y position variable for your event
Have the event run around if you want that and use a Parallel Process with a Loop containing a wait state and a conditional branch setup. You compare the x positions of your player char to the event and if they don't match, move the player 1 tile left or right for "player x > event x" and "player x < event x" respectively; if the x values match, do it for y instead.
You can also define animations for the pull, use moveroutes to temporarily direction-fix your player, change the speed or use jump commands etc to make it more visual.
-x position variable for your player
-y position variable for your player
-x position variable for your event
-y position variable for your event
Have the event run around if you want that and use a Parallel Process with a Loop containing a wait state and a conditional branch setup. You compare the x positions of your player char to the event and if they don't match, move the player 1 tile left or right for "player x > event x" and "player x < event x" respectively; if the x values match, do it for y instead.
You can also define animations for the pull, use moveroutes to temporarily direction-fix your player, change the speed or use jump commands etc to make it more visual.
This is very helpful. A bit of a rabbit hole, but I think I can make that work. Thanks a lot!
Original thread: https://forums.rpgmakerweb.com/threads/move-actors-towards-event.122878/