I have a button mashing event where you have to press the Z button to get a monster off you. The event works fine until it is done and the player goes out of the room, but when they enter the room again, the monster and the health bar are still there, and the fight music is still playing. I can't get them to go away.
Screen Shots of the Event
Common Event
Timer
Press Z Button Graphic
Here is what the screen looks like while the event is going
Screeenshot
And what happens when I try to enter the room again. I am stuck behind the monster, the music I have assigned for this case is still going, and the bar at the top will not go away, even if I erase the picture.
Screenshot
I can't use Erase Event, because if I do the entire thing stops working, and I have switched off all of the events that trigger it as you can see in the Timer Screenshot. I don't know how to get back into the room normally.
After Effects of Button Mashing
● ARCHIVED · READ-ONLY
-
-
Are the last pages in your timer and Z-graphic events conditioned by self switch A?
Where are you turning on the Z-button-is-pressed switch?
Also, if you just want to change the picture, you don't have to erase one picture and then show another with a different number. You just use the same number each time and execute a Show Picture without erasing. It will detect the new name and replace the old with the new. The only time you need to erase it is when you no longer want a picture to show. -
Yes, that is a self-switch A
I have a cut scene right before this in which I turn on the switch to press the Z button.
That would definitely save me a lot of time. Thanks, Shaz. -
I'm not asking if it's a self switch A on the pages you've shown. I'm asking if the third page in each event HAS the self switch set as a condition?
The behaviour you're describing seems to indicate that those events are not being switched to the new pages.
Actually, it could be that you're turning OFF the z-button-pressed switch BEFORE turning on the self switch. This could mean that both events are switching back to the previous page and neither is actually getting to the "turn on self switch A" command. Since you want BOTH events to stop running, I would suggest another switch instead of a self switch, and just turn it on, and have the next page in each event conditioned by that switch. -
Oh, my apologies, yes it does.
Alright, I'll try that.
EDIT:
It didn't work, it's still doing the same thing. -
What if you had a switch for whether it was triggered, and then another for if it has already been triggered? A would be the trigger and B would be if it had been triggered. No erasing required. I tried this as a cutscene trigger once. You make it auto-run, then have a page after it for deactivating it rather than erasing.
Page 1: If A is on
This would be the event itself. After finishing, set B to on.
Page 2: If B is on
This one is empty. By having this here, Page 1 won't play, even if its conditions are met.
Hope this works. -
Can you show your new events? I wonder if there's something else that's turning the switches off? Are you still turning off the button mashing switch before turning on the new one? If you're done with the button mashing, you don't have to turn that switch off at all - you just have to turn the next one on to activate the next page.
-
I tried kamimatsu's idea of using the B Self Switch, and . . . for some reason, even though I know it wasn't working, I went and did Erase Event again, like I was hoping it would work or something? I'm not sure, I was up until four in the morning messing with this, I must have been half out of my mind. Here are the new screenshots:
Custom Event - All I changed on this one was I took out all the erase pictures and kept the picture ID the same.
Timer - I put the z-button-pressed switch after the switch that puts the event on another page. I wasn't too sure whether this was necessary or not, but I did it anyway. After reading Shaz's comment, I'm thinking it wasn't, so I'm going to erase it and see what happens.
Z Button Graphic
I tested this out - when I went back into the room, the health bar and the music were gone . . . however, the Z Button Graphic stays on the screen, no matter what room I go in. -
Erase Event will not work, because it just removes the event while you're on the map. As soon as you leave and return, it will happen again. This is why I told you to use a regular switch.
So can you remove anything about the self switches, remove the bit where you turn the button mashing switch off (as I said in my previous post), and JUST turn on a NEW switch that conditions the third page of both events?
To get rid of a picture, you have to actually do Erase Picture. Going from one map to another does not remove them. -
If you'll look at the bottom of the Z Graphic Page, you'll see that I did erase the picture, and it's still appearing.
Whether I use self switch B or a regular switch (which I did do just now, as you suggested), the music and the health bar go away when I enter the room again. -
When you used a regular switch, did you also get rid of the B self switch in your z graphic event and condition the last page by the new switch?
-
Yes
-
I'm out of guesses. Can you load your game up somewhere (not 4shared) so I can take a look at it? Even just the two maps (even just a demo) that clearly shows the problem.
-
There are a lot of changes I would suggest making to the design. You don't need 10 versions of the HP bar, for example. You only need 2. A background and a bar. Every time you need to lower the HP, you decrease the width of the bar instead. If you want there to be a static gradient on the bar, just make a 2nd picture with a dark to transparent graphic and overlay it on top of the bar at your desired opacity. This eliminates all those extra pictures.
The issue is likely coming from the Z Button is Pressed switch being turned off before the events connected to it can fully process, causing them not to finish.
I would suggest combining the pages that have those some triggers into one parallel process. There's no reason to have 2 parallel processes that essentially function the same.
Barring that, just change how they finish and give them a little extra time to process. I'd suggest using more self-switches, for example.
It's kind of hard to explain to someone who isn't very familiar with computer terms and how the game handles the different parallel processes, especially when hooked up to a switch.
Imagine Parallel Process A and Parallel Process B are both tied to the switch "GO!"
Lets say Parallel Process A has a condition that turns off "GO!" and it executes that condition and turns off "GO!"
Parallel Process B will stop whatever it was doing (like being in a loop) and not finish executing it's actions.
If you try to work around that and still have issues, it may be something else. Like page orders. Or Erase Events (Which kinda seem unnecessary in this case) Does the "Press Z" picture disappear for a little bit, but then come back when you enter a room, or does it never go away? -
Thanks, Titanhex, I'll try that out. I just realized that I had the erase picture for only one graphic, when I have two. Meaning I erased Picture 1 twice, not picture two. Fixed it, and everything went away when I walked out the door. We're all good! Thanks for everyone's help!
-
Glad to see you found a solution. Good luck on the game.