Events causing the player to lock up? (Resolved)

Status
Not open for further replies.

TheBadPill

Villager
Member
Joined
Apr 9, 2019
Messages
10
Reaction score
0
First Language
English
Primarily Uses
RMMV
So, in the past few days, I have been playing around a bunch with some events, trying to figure out how to get certain effects to happen. So far, I have managed to create a painting that watches the player as they walk past it, and I managed to get an animated grandfather clock event to just sort of autorun when the player enters the room. Both of them are working fine.
But then I wanted to set up a mirror where a ghost would walk past after the player crossed it. I have the thing set up in sort of the same way that I have the painting, but there seems to be something going wrong now that I can't figure out. I have been working at this for the past several hours and nothing I do seems to work at all. When I start the test room, the player is locked up and I can't move or turn. The automatic events like the clock and everything else in the room is working just fine, but the player won't move at all.
I've posted some screens of the events as I have them set up for the mirror. I originally tried to run it without the conditional branches, but that didn't work, so I tried them and then turned off the conditions switch on the left, and that did nothing, so I tried with both thinking maybe there was some function I was missing, but nothing worked. I know they are a little complex for something so simple, but they were working fine for every other event I made... Maybe someone has an idea of what is going on?
 

Attachments

CEO1234

Veteran
Veteran
Joined
Jun 3, 2019
Messages
40
Reaction score
2
First Language
English
Primarily Uses
RMMV
Be careful with autorun events. Are the grandfather clock and painting events parallel? Also, your first picture had event touch. Were you allowed to move then? Every other picture had autorun selected. Your player cannot move during autorun, unless that's what you want. I actually managed to do something like this for my game using one of Yanfly's plugins (YEP_RegionEvents). What I did was, I had animation variables for my mirror and every time the player would walk over the region events, the chance for the animation would trigger.

The plugin works by calling upon common events. You bind these common events in the 255 regions you can mark on your map. By using variables (I prefer them because it saves switches) you can change the images of whatever event you want when you apply those variables to it. If you don't want the player to move when this happens, you should have an empty autorun event trigger only when a specific switch is turned on. Then turn the switch off when the event is over so the player can move again.

Since Yanfly charges for their plugins now, you could alternatively just use the Common Event call option in a player touch event near the mirror and have the event trigger when they walk past it. Of course, make sure it's below characters.
 

TheBadPill

Villager
Member
Joined
Apr 9, 2019
Messages
10
Reaction score
0
First Language
English
Primarily Uses
RMMV
Be careful with autorun events. Are the grandfather clock and painting events parallel? Also, your first picture had event touch. Were you allowed to move then? Every other picture had autorun selected. Your player cannot move during autorun, unless that's what you want. I actually managed to do something like this for my game using one of Yanfly's plugins (YEP_RegionEvents). What I did was, I had animation variables for my mirror and every time the player would walk over the region events, the chance for the animation would trigger.

The plugin works by calling upon common events. You bind these common events in the 255 regions you can mark on your map. By using variables (I prefer them because it saves switches) you can change the images of whatever event you want when you apply those variables to it. If you don't want the player to move when this happens, you should have an empty autorun event trigger only when a specific switch is turned on. Then turn the switch off when the event is over so the player can move again.

Since Yanfly charges for their plugins now, you could alternatively just use the Common Event call option in a player touch event near the mirror and have the event trigger when they walk past it. Of course, make sure it's below characters.
The clock is parallel, but the painting is run by switches, basically invisible spots on the ground the player walks over to activate them.
That's what that first picture was supposed to be. It's the trigger space on the floor that the player walks over to cause the other events to start running. And I found with the other events that if you have an event being caused by a trigger event, it needs to be on autorun or it won't do anything. I've tried doing them other ways too, but nothing works.
 

ShadowDragon

Veteran
Veteran
Joined
Oct 8, 2018
Messages
1,696
Reaction score
556
First Language
Dutch
Primarily Uses
RMMV
@TheBadPill autoruns stops player movement, if you want it anymate, make sure
"Stepping" and "Direction Fixed is ON", so you dont need 4 pages, but 2. you can also use
selfswitch A is on, wait x seconds and selfswitch A is OFF on the 2nd page (in parallel)
 

TheBadPill

Villager
Member
Joined
Apr 9, 2019
Messages
10
Reaction score
0
First Language
English
Primarily Uses
RMMV
@TheBadPill autoruns stops player movement, if you want it anymate, make sure
"Stepping" and "Direction Fixed is ON", so you dont need 4 pages, but 2. you can also use
selfswitch A is on, wait x seconds and selfswitch A is OFF on the 2nd page (in parallel)
None of that helped.
And the animation is too large for a sprite, so I an using the switch to swap out the texture like I did for the painting.
 

Andar

Veteran
Veteran
Joined
Mar 5, 2013
Messages
30,015
Reaction score
7,025
First Language
German
Primarily Uses
RMMV
And I found with the other events that if you have an event being caused by a trigger event, it needs to be on autorun or it won't do anything.
As you've just found out, triggering other event actions by switches is a very bad idea.
Because no matter what else, an autorun will stop the player movement, that is it's main purpose.

The basic rule is that one cutscene needs ONE controlling/trigger event that contains all commands. Any structure that moves commands to other events is a bad idea.

Please remove all commands from all three pages of the mirror event 18 and change the trigger to action button (which will do nothing because there are no commands there.

Move the commands to the controlling/trigger event instead, where they need to be in a single page - just wait, then change switches, then wait, change switches again and so on.

In the trigger event, please move the conditional branch "spooky in the party" to the conditions, Actor = spooky - that is exactly the same condition, but it will help the engine keep the events streamlined.

Now there are two possibilities depending on what exactly you want, but both are in the triggering event.
1) simply add the sequence of waits and switch changes to the single page of the triggering event. This would be the simplest solution, but it might cause timing to be off.
If the timing is off, then that trigger event needs to be done in two pages

2) two-page-trigger:
have the first page only one command, self-switch A=on
have the second page conditioned to self-switch A and be triggered on parallel process (NOT autorun) and contain the sequence of waits and control switches for the mirror.
At the end of the switch sequence, add a self-switch A=off

That way you can correct the timing with a wait at the beginning of the second page.

And in the future, if nothing else, always remember:
In any single sequence all commands need to be on a single event page, NEVER split commands over multiple events with condition control.


EDIT: the second solution has the disadvantage that too many parallel processes will cause your game to lag. Because of that you should always try to get it done with simple triggers instead of parallel process, but sometimes you'll need them.
 
Last edited:

TheBadPill

Villager
Member
Joined
Apr 9, 2019
Messages
10
Reaction score
0
First Language
English
Primarily Uses
RMMV
As you've just found out, triggering other event actions by switches is a very bad idea.
Because no matter what else, an autorun will stop the player movement, that is it's main purpose.

The basic rule is that one cutscene needs ONE controlling/trigger event that contains all commands. Any structure that moves commands to other events is a bad idea.

Please remove all commands from all three pages of the mirror event 18 and change the trigger to action button (which will do nothing because there are no commands there.

Move the commands to the controlling/trigger event instead, where they need to be in a single page - just wait, then change switches, then wait, change switches again and so on.

In the trigger event, please move the conditional branch "spooky in the party" to the conditions, Actor = spooky - that is exactly the same condition, but it will help the engine keep the events streamlined.

Now there are two possibilities depending on what exactly you want, but both are in the triggering event.
1) simply add the sequence of waits and switch changes to the single page of the triggering event. This would be the simplest solution, but it might cause timing to be off.
If the timing is off, then that trigger event needs to be done in two pages

2) two-page-trigger:
have the first page only one command, self-switch A=on
have the second page conditioned to self-switch A and be triggered on parallel process (NOT autorun) and contain the sequence of waits and control switches for the mirror.
At the end of the switch sequence, add a self-switch A=off

That way you can correct the timing with a wait at the beginning of the second page.

And in the future, if nothing else, always remember:
In any single sequence all commands need to be on a single event page, NEVER split commands over multiple events with condition control.


EDIT: the second solution has the disadvantage that too many parallel processes will cause your game to lag. Because of that you should always try to get it done with simple triggers instead of parallel process, but sometimes you'll need them.
The second one worked out for me, thanks. It was sort of functional when I went with the first route, but then it was forcing the player to stop on the trigger space for it to run before you could move again, and I wanted it to happen after you had already passed by. Using the second page with a parallel trigger made it work.
I'll just have to make sure that I keep the number of processes on one map down so I don't get too much lag.
 

Nightblade50

Developer of "Delta Origins"
Veteran
Joined
Nov 10, 2016
Messages
2,141
Reaction score
4,258
First Language
English, French
Primarily Uses
RMVXA
Yeah the difference between autorun and parallel process:

1. Autorun prevents player movement, while parallel processes do not
2. Autorun runs after a very slight delay, while Parallel is instant
 

slimmmeiske2

Little Red Riding Hood
Global Mod
Joined
Sep 6, 2012
Messages
6,486
Reaction score
4,404
First Language
Dutch
Primarily Uses
RMXP

This thread is being closed, due to being solved. If for some reason you would like this thread re-opened, please report this post and leave a message why. Thank you.

 
Status
Not open for further replies.

Users Who Are Viewing This Thread (Users: 0, Guests: 1)

Latest Threads

Latest Posts

Latest Profile Posts

Playtesting for Battle Castle is done, demo time for me was roughly 6 hours and 20 minutes. I'm going to pass it on to a few friends first, and after getting some feedback will be posting an official topic.
There's another Humble Bundle available now for RPG developer assets, this time focused somewhat more towards pixel art style games.
Ive got a long lost half uncle. Thats real cool.
I forget what is bumping rule in this forum. Is anyone know? Thank you.
BCj
Ew, why does my blogpost on the rpgmaker.net site look like a garbled mess? Are html codes disabled or something?

Forum statistics

Threads
97,902
Messages
947,748
Members
129,145
Latest member
PokeeyXD
Top