Adventure Game Studio

AGS Support => Beginners' Technical Questions => Topic started by: pilen on Mon 03/10/2011 10:07:39

Title: Field of view help
Post by: pilen on Mon 03/10/2011 10:07:39
Hi.
Me and my two classmates are learning basic scripting using AGS. Our game is pretty simple and we're adding stuff as we go. Here's some footage:
http://www.youtube.com/watch?v=3hZZHr7GFHU

My question is:
we have an area outside the prison cells (like the courtyard) where we want guards to patrol. I want to give these guards a field of view. When we attempted this we used an object that takes the coordinates from the character and follows it. It's pretty much enough but it only works with eNoBlock. And therefor it's useless.

Any help appreciated. (I did find a complicated thread about this where walls affect the fov but I'm just interested in a few easy lines of code:) )

*UPDATE* we set a timer that updated the objects location and then it worked. Any better solutions for this is much appreciated!
Title: Re: Field of view help
Post by: David Ostman on Mon 03/10/2011 11:12:13
There's some vision cone discussion in this thread that might be useful:

http://www.adventuregamestudio.co.uk/yabb/index.php?topic=42873.0
Title: Re: Field of view help
Post by: pilen on Tue 04/10/2011 09:05:15
Thanks for the response. I just wanted an area around the character, not necessarily a cone. I did learn alot from that though