public

Rpg Maker Developers Group

Simple enough for a child, powerful enough for a developer

2 Followers

Moving Event via script call problem

BMM Archive · July 15, 2026

Preserved forum archive. This topic stores the original first post and locally mirrored RPG Maker Web attachments when available. It is posted by the BMMPlay archive account, not by the original creator.

Original Source

  • Original title: Moving Event via script call problem
  • Original author: autophagy
  • Original date: November 1, 2016
  • Source thread: https://forums.rpgmakerweb.com/threads/moving-event-via-script-call-problem.70442/
  • Source forum path: Game Development Engines > RPG Maker Javascript Plugins > Javascript/Plugin Support

Summary

Hello! I am trying to move an event (ID 18 in this case) via script call, and I'm trying to move it exactly three times. My code looks like this: var i = 3; while (i > 0)

Archived First Post

Hello!


I am trying to move an event (ID 18 in this case) via script call, and I'm trying to move it exactly three times. My code looks like this:


var i = 3;
while (i > 0)
{
$gameMap.event(18).moveRandom();
i--;
}


The event jumps around weirdly instead of moving properly when I do this.


Example:


Protected download


Is it because the script is not waiting for the movement to finish? How do I get it to wait?


If I use a for loop instead, the event only moves once instead of three times.

Downloads / Referenced Files

Log in to download

Log in, then follow the RPG Maker Developers Group to see these download links.

Log in to download

Referenced Images / Attachments

movement.gif
movement.gif
Creator Claims / Removal

If you are the original creator and want this listing reassigned, edited, or removed, join BMMPlay and contact the moderators with proof that matches the original RPG Maker Web profile, linked GitHub, itch.io page, or another public creator identity.

#039#rpg-maker-archive#js-support

Replies (0)

No replies yet.

0 replies 1 view

Log in to reply.

User Avatar