Moving two events that are side-by-side at the same time

HankB

Veteran
Veteran
Joined
Mar 5, 2021
Messages
47
Reaction score
10
First Language
English
Primarily Uses
RMMV
I hope I can describe this clearly. I have two events (Event #001 and Event #002) that are next to each other, one left and one right, like:

|1|2|

Each event has a page set to a switch named "move_left", which is parallel, which has (on the page, not within Autonomous Movement):

Set Movement Route : This Event : (skip) (wait) Move Left
Switch Off : move_left

If I flip that switch, both events move left at the same time, which is what I want. But if I change the positions so that it's |2|1| instead of |1|2|, then only the leftmost event moves.

I assume this is because javascript is a single thread language, and the lowest numbered event, Event 1, is processed first, which means that if Event 2 is on the left, it gets in Event 1's way, so it skips event 1 (because it can't move), and then just moves event 2.

I can't make them "through" or they're moving through walls, and I can't remove "Skip if can't move" or everything freezes up. I can't think of a solution.
 

Dev_With_Coffee

Veteran
Veteran
Joined
Jul 20, 2020
Messages
680
Reaction score
320
First Language
PT-BR
Primarily Uses
RM2k3
In general I didn't understand much. A tip, when moving two events at the same time, the first should disable "Wait for completion"
Code:
◆Set Movement Route:EV001
:                  :◇Move Down
:                  :◇Move Down
:                  :◇Move Down
:                  :◇Move Down
◆Set Movement Route:EV002 (Wait)
:                  :◇Move Down
:                  :◇Move Down
:                  :◇Move Down
:                  :◇Move Down
 

BK-tdm

Manga Maker
Veteran
Joined
Jun 21, 2018
Messages
265
Reaction score
772
First Language
English
Primarily Uses
RMMV
Code:
◆Set Movement Route:EV001
:                  :◇Move Down
:                  :◇Move Down
:                  :◇Move Down
:                  :◇Move Down
◆Set Movement Route:EV002 (Wait)
:                  :◇Move Down
:                  :◇Move Down
:                  :◇Move Down
:                  :◇Move Down
Pretty much this, forget about the move routes inside every event and make a global event that will move those 2+ events, dont set to wait for movement route unless its the last event in the list, that way they will all move at the same time.
 

ArcanaMoonShine

Villager
Member
Joined
Apr 17, 2021
Messages
26
Reaction score
21
First Language
Spanisg
Primarily Uses
RMMV
You change the positiong of the Events, but did you change the order or processing? It should not matter, but stil you should try that. With that i mean this:

|2|1|

This is your order, but in the event, you have, "Move 1" Before "Move2 (Wait)", try to put it "Move 2" and them "Move 1 (Wait)" and see what happend
 

HankB

Veteran
Veteran
Joined
Mar 5, 2021
Messages
47
Reaction score
10
First Language
English
Primarily Uses
RMMV
In general I didn't understand much.

Yeah, I'm now thinking that this is one of those situations where it might actually be easier for me to create a small demo rather than explain it verbally (it's a lot of things to juggle in your head at once, but much easier to understand when you see it in action). I'll go ahead and do that now.
 

ATT_Turan

Forewarner of the Black Wind
Veteran
Joined
Jul 2, 2014
Messages
1,270
Reaction score
674
First Language
English
Primarily Uses
RMMV
Also, if you're using a controlled move route, I don't understand how turning Through ON would have anything to do with walls...just don't make their route go through a wall.
 

HankB

Veteran
Veteran
Joined
Mar 5, 2021
Messages
47
Reaction score
10
First Language
English
Primarily Uses
RMMV
OK, I'm still working on the demo, which should make things clear, but I'll go ahead and try to explain it a little better than I did the first time. It's one of those mechanics that's tricky to explain with words, but is pretty easy to understand once you get your hands on it and can see the point.

I'm making a puzzle game that involves moving two or more events around at a time. This is a core mechanic of the game. When I press the UP key, both events move up, and when I press the LEFT key, both events move left, etc.

However, sometimes one of the events will be blocked by some obstacle and can't move. In that case, the blocked event won't move, but the other one will. For example, I'm pressing the UP key, and Event 1 hits a wall, and can't move forward anymore, but event 2 moves a space up. I can then keep pressing the UP key, and event 2 will keep moving up, while event 1 keeps banging its head against the wall and going nowhere.

The way I'm doing this: I'm using Yanfly's Button Common Events to flip on a switch called "move_up". Each separate event that I want to move has a page set to that switch, and on that page it has:

Set Movement Route : This Event : (skip) (wait) Move Up
Switch Off : move_up

So because these events are moving all over the map, I never know whether it's going to hit a wall until it does. If I had "through" on, then the events would just pass through wall when they reached them. And this is also why I need "skip if can't move" checked, so that the event that is blocked will just give up and let the other, unblocked event, move forward.
 

ATT_Turan

Forewarner of the Black Wind
Veteran
Joined
Jul 2, 2014
Messages
1,270
Reaction score
674
First Language
English
Primarily Uses
RMMV
As mentioned in other posts, the skip box has nothing to do with your problems - it's them both having Wait that's causing it. You have to be issuing both events their move route from the same event, and the first one doesn't have Wait checked.

Since you're already using Button Common Events, I don't understand why you're then making it more convoluted by activating switches and having each event do its own movement - just control them both from the common event called by your button press.
 
Last edited:

HankB

Veteran
Veteran
Joined
Mar 5, 2021
Messages
47
Reaction score
10
First Language
English
Primarily Uses
RMMV
You have to be issuing both events their move route from the same event

That's actually what I did originally, I had an event on the map running parallel that would switch on, move the events, and then switch itself off, and I had the same problem. So I thought maybe I needed to do it from within each event itself, but that didn't work either. And I didn't want to move all the events from a common event, because on some maps I'd just be moving a couple of events and some maps I'd be moving up to a dozen, so I wanted to have it customized for each map.

the skip box has nothing to do with your problems

From what I can tell, that was completely the problem. I had Skip checked for each move route because I assumed (wrongly) that if an event was trying to move and couldn't, you needed to have skip checked or else it would get hung up.

So I tried it the original way (with an on-map parallel event running all the move routes), but unchecked all the skip boxes, and it works perfectly now. I'm still not completely clear why it doesn't get hung up without "skip" being checked, as it seems to just skip regardless.
Anyway, it's working now. I appreciate everyone's input. Thanks!
 

Dev_With_Coffee

Veteran
Veteran
Joined
Jul 20, 2020
Messages
680
Reaction score
320
First Language
PT-BR
Primarily Uses
RM2k3
I remembered now, about 10 years ago I made a route system by Terrain ID.
It was to create a unique route for some events to simulate a racing game.
I did it on Rm2k / 2k3 and RmXP, maybe with Region ID it is possible to recreate this system.
 

Latest Threads

Latest Posts

Latest Profile Posts

E7DsT3VXsAInVpu

working on my avatar, because i couldn't stand looking at it anymore :D
still not finished though...
alpacaraptors = love!
''Finds icons that fits the game you're making'' Only covers 20% of what you need :p
I'm very manic-y right now. I didn't sleep and I wanted to get a bunch of stuff done, but didn't get anything done except the bare bones concept for a POSSIBLE game.
And I can't sleep now because I'm probably gonna be hanging out with my brother and I gotta discuss a bunch of BroCoG (our game group) junk with him plus it's far to late to sleep NOW.
poppetQuestBarryApproaches.jpg
While I wait for judging, I decided to start adding more "friends" to my attic. :LZSgrin:

I swear I need a whole sound pack of menacing squeaky toy noises. :kaoswt:
I can't believe I actually managed to stay motivated for the whole Game Jam duration (1 month!), definitely will be taking a break after this :0

Forum statistics

Threads
113,581
Messages
1,075,985
Members
147,565
Latest member
RePeat
Top