Here's my problem:
I have two guards standing, facing each other in front of a door. When you approach them they will say "sorry you cannot pass" until you talk to the King. He will give you a task at which point the guards back away one square and allow you in.
I made an event and gave it the text "Sorry you cannot pass." and set the trigger to player touch. Then once you talk to the King it turns on the switch that activates the 2nd page of the npc's event that makes them move back and allow you in.
However, they still say the text from the 1st page. This is very early in my game so I didn't make a key for the first event page.
I just don't know how to stop them from talking after they already let you pass..
Thanks!
You've set up your event incorrectly. Could be one of several things (if you'd posted screenshots of your event pages, I'd be able to tell you exactly which one, so remember that next time you need event logic assistance - and include the WHOLE event window in the screenshot, because in many cases the issue is NOT in the list of event commands).
- your event's second pages are not conditioned by the switch, or by the wrong switch
- you've used the switch condition in event commands and not as page conditions
- your event's pages are in the wrong order - the default one where they stop you should be page 1, the one conditioned by the switch where they let you enter should be page 2
- something else is turning the switch off again after you talk to the king
Could be other reasons too, but these are the more likely ones.
Nevermind. Can you delete this thread?
If you need help, please post the full event window. Giving up because you've been asked for more info is not going to help you learn or progress with your game 🙂
They're saying the text from the first page because you turned the switch off again as part of the autorun event.
What's meant to happen AFTER they let you pass? Do you go through to another map? Can you come back again? Are they meant to be standing in the original positions, or where they've moved to? Are they meant to be in the original positions and move out of the way EVERY time you enter the room?
There are several ways to fix the issue, and which one is best depends on how you want them to behave AFTER moving out of your way.
So they're in the same room as the king, but you've got them set to automatically move as soon as the king asks you to go and check on them? (Or is it someone else you're checking on?) Do you want them ALL to step back at the same time?
Easiest way is to have 2 events for each guard. If they step away as soon as the king tells you to go check, remove the autorun events from the guards, and put the following on the king event:
Set Move Route: Guard 1 (don't check the Wait for completion box) Through ON Move up Turn RightSet Move Route: Guard 2 (don't check the wait box) Through ON Move down Turn RightSet Move Route: Guard 3 (don't check the wait box) Through ON Move Up Turn LeftSet Move Route: Guard 4 (check the wait box this time) Through ON Move Down Turn LeftControl Switches [??? Guards Moved] = ONOn each guard, add a second event page controlled by the [??? Guards Moved] switch. Leave EVERYTHING else as default - blank sprite, action button, below characters priority, no commands.Then create a NEW event for each guard, in their final position and facing out away from the walls. This just has one page per event, and that page is conditioned by the [??? Guards Moved] switch.
So what will happen is that you'll talk to the king, the guards (original events) will step back from the door and turn so their backs are against the wall. Then the switch will be turned on and the original guards will be replaced with the "in-position" guards. When you leave the room and come back, because that switch is on, the "new" guards will be visible, but the "original" ones won't.
The person you check on is not in the room. Also, which guards are which? I only want 2 guards to move in this event, the 2 on the right.
You didn't create multiple events for each guard and condition the pages by switches the way I explained.
I did consider giving you a link to that script, but scripting is an advanced topic, and using switches with events is a basic topic. I was very hesitant to send you down the scripting path, because you're having so much trouble with simple events, and there were OTHER issues with your events than just getting the guard to stay there.
Anyway, let us know if you manage to get it working.
Yes I got it working, I'm up to about 10 minutes of event-filled gameplay now.
Thank you Shaz for this genius script.
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.