Looping boulder trap

Hello first time poster here! I'm trying to make an automatic looping boulder trap for the player to avoid carefully. And by looping boulder trap I mean those traps from stuff like frogger on the game boy advance, like frogger in general actually. Like how the cars loop from one side of the screen to the other. How can I do this in this engine? Can I even accomplish this?
Can you show the work you've already done on the event?

It sounds like it should be as simple as moving a certain number of spaces then transferring itself back to the starting coordinates.
stone process.png

Okay so you step on the event next to the character right? Then the boulder moves down to other die of the room. But I can't make it loop back to its starting position unless you step on the event square again. This needs to be done automatically as the whole room will be filled with them.

Also the boulder kills you if you come in contact with it.
That is not a picture of the event, that's a picture of your map. It doesn't show us how you've tried to make it work.
Apologies here
stone event.png

I've tried using the loop command too, but that just freezes the player in place.
That's the wrong place to put all of those commands.

That's saying your boulder is going to sit in one place and when the player touches it (Trigger: Player Touch) it will set a switch and set its location and move back and forth and turn a switch off (except the switch will never turn off unless the player walks into it again).

It also doesn't appear to do what you said you want - you said you want it to go down and teleport back to the beginning (loop), but that move route is moving down and moving back up.

The movement commands should go in the Autonomous Movement section and the event commands are whatever you want to happen to the player when the boulder hits them.

1713890120083.png


The script call at the bottom is to teleport it back to its starting location - I Googled "rpg maker vx ace script call transfer" and got this syntax:
Code:
$game_map.events[4].moveto(11, 6)

The 4 is the event ID of the boulder, and the 11, 6 are the X, Y map coordinates for it to go to.
That script syntax seems to have crashed the game, although maybe i need to edit the numbers hold on.
Yes the boulder is looping now!
Another way you could do it is just set the "Autonomous movement" to going up and down, and then make it so when you touch the bolder you die, (or go back to the start) using the trigger "Player Touch". I'm at a loss for why you need scripts???

1713905788664.png

1713905870093.png

Would this not work???
I'm assuming they want the boulder to only go in one direction, like a boulder rolling down a hill would.
I'm at a loss for why you need scripts???
I mean those traps from stuff like frogger...loop from one side of the screen to the other.
It's what the OP said they wanted.
I'm at a loss for why you need scripts???
Because your solution is a back and forth and the desired solution goes in one direction.
So the event needs to be transferred back to the starting point.

Original thread: https://forums.rpgmakerweb.com/threads/looping-boulder-trap.168017/