Adventure Game Studio

AGS Support => Beginners' Technical Questions => Topic started by: protek on Mon 07/11/2016 13:11:43

Title: Player conditional exit of room
Post by: protek on Mon 07/11/2016 13:11:43
I've set to the room right edge leaveRightEdge event handler a condition that'll prevent the player character exiting the room unless the condition is met. If the condition isn't met, I use the display function to tell that the player can't leave the room.

The problem is that the game gets stuck displaying the message on a loop and I can't move the player character. Is there way that the message would be displayed only once per attempt to exit the room?

Thanks!
Title: Re: Player conditional exit of room
Post by: Slasher on Mon 07/11/2016 13:19:47
A simple way is to have the character walk (eBlock) back away from the edge.
Title: Re: Player conditional exit of room
Post by: protek on Mon 07/11/2016 13:30:45
Ah, I actually tried the walking but didn't determine the eblock. Have to try that this evening. Thanks!
Title: Re: Player conditional exit of room
Post by: Cassiebsg on Mon 07/11/2016 16:54:13
Yes, and make sure you do it before the display. ;)
Title: Re: Player conditional exit of room
Post by: protek on Mon 07/11/2016 17:15:20
It's working. Thanks for help! :D