Step event call for... events? How to do?

OK so I want to do something similar to what was achieved in this thread:


But only one difference. It needs to be for an event known "this event" so it can apply to any specific event I want it to. Only a couple of problems. I want it to be a common event and also a parallel process.

So what do I do and how is it supposed it know which events specifically are "this event"?
place it as the first event each time you make a new map, then in the common event, have it target "Event 1"
place it as the first event each time you make a new map, then in the common event, have it target "Event 1"

That won't do. It needs to be able to work for any number of specific events not just one.

Also I am sure I will need to change the script specified in the conditional branch. How do I change that?
what're you trying to do?
Given that that method uses variables to check the player's current location, if you wanted to do something similar with events, you would need two variables per event. That means you can't make it generic, unless you use a self variables plugin.

Also note that it won't be a good idea to run many parallel process events at once, to check if many events have taken a step. That will cause your game to lag.

Why do you want to do this? What is happening in your game that you need to track whether multiple events have moved? There might be a better way to do this for events, than the method suggested for the player in the initial thread.
If you want to move multiple events with steps the easiest way is probably a moveroute. You can take the basic ones and edit them slightly with what you want to do.

Code:
Game_Character.prototype.moveStepRandom = function() {
    var d = 2 + Math.randomInt(4) * 2;
    if (this.canPass(this.x, this.y, d)) {
        this.moveStraight(d);
        Insert stuff here
    }
};
Refer to
with what you want to put, then in the movement route of the event you would put
this.moveStepRandom();
for example, that movement would have to go into a random plugin file.
Given that that method uses variables to check the player's current location, if you wanted to do something similar with events, you would need two variables per event. That means you can't make it generic, unless you use a self variables plugin.

Also note that it won't be a good idea to run many parallel process events at once, to check if many events have taken a step. That will cause your game to lag.

Why do you want to do this? What is happening in your game that you need to track whether multiple events have moved? There might be a better way to do this for events, than the method suggested for the player in the initial thread.


The variables I am using for player I am also using for events since that in and of itself is just a name, the real separator here is the game data specified in the control variable.

In this case it's an event instead of the player.

The reason I want this is for interaction purposes while maintaining any parallel process-like actions at the same time. In this case the step effect is for giant non-player characters, each time they take a step, the stepping sound (blow6 is used for this) and the screen shaking effect plays. But I also want to be able to allow event interaction such as event touch, player touch, and action button.

Of course I wouldn't put like 100 of them on a single map, that's crazy! I can't give a range but it would much lower than that. More like 10 to 25. Of course that's not to say all of them would be actively moving all the time or even at all.

Right now I am not really making a game per say, just merely experimenting with stuff at this time.

EDIT: After much consideration, I have determined that the best and only simplest way to achieve what I want to achieve is to have a separate parallel event for each affected event on the maps themselves. It simply would not work well, if at all, as a common event.
How are you making your events move? If you're doing it in the Autonomous Move Route, just set it to Custom, add a Move command (random, towards player, etc), and then add a SE and screen shake afterwards. If those commands are not available inside the move route, you can use a script call in the move route to do it.

The issue with using the same variables is that you could have the situation where event 1 sets the variables, then before it can check the location, event 2 resets the variables to its own location. So event 1 will do something based on where event 2 is.

I have determined that the best and only simplest way to achieve what I want to achieve is to have a separate parallel event for each affected event on the maps themselves. It simply would not work well, if at all, as a common event.
Unfortunately every statement here is wrong. It would not be either the best OR the simplest way. And there is no reason it could not be run as a common event either.
After making the edit to my previous reply, I have reported this thread as resolved so please don't bother replying to this thread. If you want to discuss this further, contact me via PM.
Thread closed

Original thread: https://forums.rpgmakerweb.com/threads/step-event-call-for-events-how-to-do.118178/