Field of view help

Started by pilen, Mon 03/10/2011 10:07:39

Previous topic - Next topic

pilen

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!

David Ostman

There's some vision cone discussion in this thread that might be useful:

http://www.adventuregamestudio.co.uk/yabb/index.php?topic=42873.0

pilen

Thanks for the response. I just wanted an area around the character, not necessarily a cone. I did learn alot from that though

SMF spam blocked by CleanTalk