RPG Maker VX Ace

RPG Maker VX Ace

View Stats:
Enemies disappearing / weird switch issue.
Okay, so I have a set up where the player enters an area to do some scouting. On their first entry, they will not trip the conditional branch that spawns enemies in the area, and will find nothing.

Upon entering again later in the story, they trip the conditional branch, which toggles 3 switches on. These 3 switches turn on 3 separate guard enemy events that the player will have to battle their way through as they make their way down a hallway.

This part works fine.

Each group of guards is set to their own switch. All of them get toggled on when the player enters the area for the 2nd time. And each event is set to turn off their own switch, and ONLY their own switch if the player wins the battle "under the "If win" part of battle processing".

Yet for some reason, as soon as the first group of guards go down... all three of the enemy packs disappear. Despite me checking and double checking to confirm that they are all indeed separate switches.

3 different events, and 3 different switches. I really can't seem to fathom why this is happening and the game is treating them as one. Is it simply because they share a graphic?



Also, the reason I am not using self switches for this, is because I do not want them toggled on when the player enters the area for the first time. And I'm not sure how to prevent that from happening with a self switch.

I also do not want them re-spawning when the player enters again at any other point. It's meant to be a one and done encounter. Which is why I'm not simply using "erase event" either.
Last edited by ☠Black Knight; 3 Jan @ 5:49pm
< >
Showing 1-3 of 3 comments
It's hard to tell without seeing the code but maybe the initial event (that turns on all three switches) is somehow involved?
Too many potential avenues for failure or error to guess without seeing a screenshot or something. It's probably something very simple.

If you don't want to do that, you can start your Playtest where you're testing it and press F9, this will bring up a menu with what the state of your Switches and Variables are.
You can see what's turned on or what value is, then do something, and see what Switches or Variables changed, and you'll theoretically know what is causing it (at least what event).
(You can also do this to turn on Switches or set values without having an event nearby to test quests and completion events without having to run through a whole section of game.)

Then it's hunting down what's changing things.

But also, using a Self-Switch for each Guard event to turn itself off should be fine (as long as you don't plan to have them reappear or activate again later.)
Last edited by AceHangman; 7 Jan @ 4:57am
Originally posted by AceHangman:
Too many potential avenues for failure or error to guess without seeing a screenshot or something. It's probably something very simple.

If you don't want to do that, you can start your Playtest where you're testing it and press F9, this will bring up a menu with what the state of your Switches and Variables are.
You can see what's turned on or what value is, then do something, and see what Switches or Variables changed, and you'll theoretically know what is causing it (at least what event).
(You can also do this to turn on Switches or set values without having an event nearby to test quests and completion events without having to run through a whole section of game.)

Then it's hunting down what's changing things.

But also, using a Self-Switch for each Guard event to turn itself off should be fine (as long as you don't plan to have them reappear or activate again later.)

Oh, yeah, sorry. Didn't realize I had forgotten to update this with the solution. But you were right about it being very simple lol. The problem was that I was reloading the save data, at a point where I had already entered the room. So the changes I made to the event that actually transfers you to that area, and was responsible for setting the switches... wasn't being toggled.

A new save file fixed all of it. Real facepalm moment lol.
Last edited by ☠Black Knight; 7 Jan @ 2:44pm
< >
Showing 1-3 of 3 comments
Per page: 1530 50