I’m looking to code a guard that moves back and forth between two rooms every 5 turns or so. If the player enters the room when the guard is there or the player is in the room when the guard enters, I would like the player to be caught ending the game. So far, a lot of the information I’ve read has given me bits and pieces of what I need to know, but I haven’t been able to piece together how to make this work. Does anyone know of any examples of coding I can look it or any reference material regarding this kind of specific handling?
**edit, to whom it may concern, I’m somewhat annoyed that I had to create a new email address to sign up here because my standard email address could not be accepted.