I assume we are talking about the camera entity from Modern Day 2- the animated camera. I use the camera in one of our developments and the following script is attached to the camera's main script field.
;Artificial Intelligence Script
;Header
desc = Security Alarm
;Triggers
:state=0:animate=1
:state=0,plrdistwithin=250:state=1
:state=1:activateifused=1,loopsound=audiobank\klaxon.wav,state=2
:state=2,animate=1
;End of Script
From how I have this particular level, I used the "plrdistwithin=250" to give the best result. The player does have a "secondary" route to use to get past, but if they get within that distance, then the alarm starts and the guard inside the guard shack is "spawned". I could modify it to include lights coming on, etc.
Quote: "Now, if say the camera was at a certain point in its animation, the light would go to the ON state which is the 1 value, and if anything went in the light bounds, it would trigger whatever you wanted to be triggered."
Defiler hit the nail on the head perfectly. We made a camera and BlueFox animated it. We have a bunch of frames and have 4 groups of "animations". Here is what I mean.
1. Camera is placed and it faces straight. That is start position or position 0.
2. Camera rotates 45 degrees left and stops. That is position 1 (animate=1).
3. Camera rotates 45 degrees back to start position. That is position 2 (animate=2).
4. Camera rotates 45 degrees to the right and stops. That is position 3 (animate=3).
5. Camera rotates 45 degrees back to the start position. That is position 4 (animate=4).
I can then script my camera using the "animate=#" when I want it to rotate in a certain position at a certain time. I can script it to include lights, alarms, etc when a certain animation is run.
Twitter: @NFoxMedia