# The Classroom - Enemies With Sight

**URL:** <https://forum.kirupa.com/t/the-classroom-enemies-with-sight/60852>\
**Category:** flash\
**Created:** [August 13, 2004, 5:18am UTC](https://forum.kirupa.com/t/the-classroom-enemies-with-sight/60852 "2004-08-13T05:18:23Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![Spinner](https://avatars.discourse-cdn.com/v4/letter/s/ac91a4/32.png) [@Spinner](https://forum.kirupa.com/u/Spinner)\
**Post date:** [August 13, 2004, 5:18am UTC](https://forum.kirupa.com/t/the-classroom-enemies-with-sight/60852/1 "2004-08-13T05:18:23Z")

</div>

Okay, what I wanted to do was make Metal Gear Solid style game (more like a level and expand from there) based off of [The Classroom.](http://www.stickpage.com/theclassroomplay.shtml)

I’ve got the movements, obstacles and all that down but I was wondering how the field of vision was done.

I imagine this is a cone in front of the enemy with a hit test on the main character. Could someone confirm or if I’m wrong what would be the best way to make it.

I was also wondering how the “safe spots” would be done and if the enemies movement is just looped tweens (I’m mostly looking at level 2) or not.

Thankyou.

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [August 13, 2004, 5:49pm UTC](https://forum.kirupa.com/t/the-classroom-enemies-with-sight/60852/2 "2004-08-13T17:49:08Z")

</div>

convienently titled [[url=“http://www.kirupaforum.com/forums/forumdisplay.php?s=&daysprune=&f=42”]_Game/AI Programming_](http://www.kirupaforum.com/forums/forumdisplay.php?s=&daysprune=&f=42)…

dont spose you coulda tried posting in there first? (coz thas wer this thread really belongs… ;))

Prophet.

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [August 13, 2004, 6:42pm UTC](https://forum.kirupa.com/t/the-classroom-enemies-with-sight/60852/3 "2004-08-13T18:42:01Z")

</div>

i think the field of vision would have been done like this:  
1st. produce your character!  
2nd. get the distance from the Teacher character to the Pupil character.  
3rd. if this distance is less than a certain number, test for:  
4th. the angle of the pupil from the teacher being within a certain range

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [August 13, 2004, 11:40pm UTC](https://forum.kirupa.com/t/the-classroom-enemies-with-sight/60852/4 "2004-08-13T23:40:54Z")

</div>

… and that’s exactly how i did it. hope this helps you - now i’m going to make a game out of it.

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [August 14, 2004, 12:35am UTC](https://forum.kirupa.com/t/the-classroom-enemies-with-sight/60852/5 "2004-08-14T00:35:47Z")

</div>

And that’s exactly how i did it… now i’m away to make a game of it. maybe tomorrow though.

hope this helps!

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [August 14, 2004, 12:42am UTC](https://forum.kirupa.com/t/the-classroom-enemies-with-sight/60852/6 "2004-08-14T00:42:55Z")

</div>

it certainly looks like the movement is looped tweens

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [August 14, 2004, 3:34am UTC](https://forum.kirupa.com/t/the-classroom-enemies-with-sight/60852/7 "2004-08-14T03:34:55Z")

</div>

Thankyou, this is exactly what I was looking for. Thankyou.

Prophet: I’ll remember to put these posts in the Game forum next time.

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [August 14, 2004, 11:06am UTC](https://forum.kirupa.com/t/the-classroom-enemies-with-sight/60852/8 "2004-08-14T11:06:23Z")

</div>

🙂 you do that 😉

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [August 14, 2004, 12:31pm UTC](https://forum.kirupa.com/t/the-classroom-enemies-with-sight/60852/9 "2004-08-14T12:31:06Z")

</div>

> [@Spinner](#):
>
> Prophet: I’ll remember to put these posts in the Game forum next time.

ta

Prophet.
