Initialisation event breaking game

Hi!

I'm currently working on my first game after picking up the software today but I'm having some trouble with my switches.

I've created a kind of initialisation event that is supposed to run once when the player first spawns in but it appears to run recursively and makes me unable to control my character.

Would anyone be able to help me diagnose/fix the problem?

The event is attached.

Thanks in advance!
Is this something that you only want to run once, and never again? Autorun means the event will continue running forever, so what you need to do is create a new event page that's blank, with the condition that the Initialization switch is turned on.

(Which means you don't need the "If initialization is off" condition on the first page; the highest page with the event conditions satisfied always takes precedence, so once the Initialization switch is turned on, only the event's second page will be active, not the first.)

For example, this would be the 2 pages of the event:

1738985488096.png


1738985514487.png
Is this something that you only want to run once, and never again? Autorun means the event will continue running forever, so what you need to do is create a new event page that's blank, with the condition that the Initialization switch is turned on.

(Which means you don't need the "If initialization is off" condition on the first page; the highest page with the event conditions satisfied always takes precedence, so once the Initialization switch is turned on, only the event's second page will be active, not the first.)

For example, this would be the 2 pages of the event:

View attachment 330936

View attachment 330937
Thanks so much for your help. I tried your method but I don't think it's working? I think I have the pages exactly the same but the game still breaks
Thanks so much for your help. I tried your method but I don't think it's working? I think I have the pages exactly the same but the game still breaks
These Screenshots seem to be correct. Do you have other events going on?

In the first post you used a conditional branch to perform your initialization once, but you didn't turn off the Autostart event. So it run empty every frame and freezing your game. Maybe you did this in a different event too?
These Screenshots seem to be correct. Do you have other events going on?

In the first post you used a conditional branch to perform your initialization once, but you didn't turn off the Autostart event. So it run empty every frame and freezing your game. Maybe you did this in a different event too?
I've done some testing and disabled every other event, no difference. Then I also disabled this event and the game runs fine. It's definitely this event *somehow*
Maybe Switch 21 or Switch 1 enable something else? They might be set as a starting condition for another Autostart for example.

What does your Lunar NPC event look like that gets activated?
Lunar appears in a few places. The first one is the same map as the initialise event, the others aren't. I've tried switching the switches, to no avail
your event on the npc run page 3, which should have page 1 and 2 with
selfswitch A, B, C one of them, if page 1 has SS A on, event page 2 runs.
on page 2, use selfswitch B and on 3 a condition for selfwitch B as well.

so the pages runs from 1 through 3 correctly.

the current setup skip page 1 and 2 entirely, something you don't want.
Did the screenshots change in the meantime? I don't see multiple event pages in the NPC event anywhere.

From the setup I don't see anything causing an eventbased freeze here.
Are the switches used somewhere else? A common event maybe?

You can use the Event Searcher to show all places, Switch 1 is used, for example.

1739020102925.png
It's only returning the one I know about 🙁
The screenshots are accurate to the setup, anything I've changed since I have changed back
Did the screenshots change in the meantime? I don't see multiple event pages in the NPC event anywhere.

From the setup I don't see anything causing an eventbased freeze here.
Are the switches used somewhere else? A common event maybe?

You can use the Event Searcher to show all places, Switch 1 is used, for example.

View attachment 330975
Did you run the same check for Switch 21?
Only the initialisation, and the lunar in the bar that turns it off after the fight
Did you run the same check for Switch 21?
I'd love to give any further advice, but from what we can see, there's no reason for the freeze ...

Since you said, it works fine if you remove that event, I assume you're not just stuck on impassable tiles either.

Do you use any plugins that might make use of Switch 1?
No worries! It's not the end of the world. I don't have any plugins or dlc at all, it's all out of the box.

If I can't figure out the answer, I may well just start again. I haven't done a crazy amount anyway
I'd love to give any further advice, but from what we can see, there's no reason for the freeze ...

Since you said, it works fine if you remove that event, I assume you're not just stuck on impassable tiles either.

Do you use any plugins that might make use of Switch 1?

Original thread: https://forums.rpgmakerweb.com/threads/initialisation-event-breaking-game.175250/