// grayman #4615 - redesigned for 2.06 // Dragofer #5528 - developed for 2.10 entityDef func_securitycamera { "inherit" "atdm:entity_base" "editor_color" "1 .5 .3" "editor_mins" "-4 -4 -4" "editor_maxs" "4 4 4" "editor_rotatable" "1" "editor_displayFolder" "Func" "editor_usage" "Don't use, base class for security cameras. See AI/Machines/Security Camera for properly useable entities." "editor_bool legacy" "Don't use, this designates an old version of the security camera. Affects how some spawnargs are processed." "editor_bool rotate" "1 = camera rotates back and forth, 0 = camera remains stationary." "editor_int sweepAngle" "The amount of horizontal sweep." "editor_float sweepSpeed" "Horizontal rotation speed in degrees per second. If 'legacy' = 1, this instead defines the time in seconds taken to perform one sweep." "editor_float sweepWait" "Length of the pause at the end of a sweep before reversing direction." "editor_bool follow" "Let the camera track the player horizontally. This will make it harder to escape its view." "editor_int follow_tolerance" "How far in degrees the player has to move before the camera readjusts its rotation, horizontally." "editor_float follow_speed_mult" "Speed up horizontal movements by this multiplier when the camera is following the player." "editor_bool follow_incline" "The camera will also track the player vertically." "editor_int follow_incline_tolerance" "How far in degrees the player has to move before the camera readjusts its rotation, vertically." "editor_int follow_incline_speed" "Speed of vertical movements to track the player. Not affected by 'follow_speed_mult'." "editor_int follow_constrain_up" "Limit how far the camera can turn upwards from its starting position when following the player. Set to 90 for no limit." "editor_int follow_constrain_down" "Limit how far the camera can turn downwards from its starting position when following the player. Set to 90 for no limit." "editor_int follow_constrain_cw" "Limit how far the camera can turn clockwise beyond its clockwise position when following the player. Set to 180 for no limit." "editor_int follow_constrain_ccw" "Limit how far the camera can turn counter-clockwise beyond its counterclockwise position when following the player. Set to 180 for no limit." "editor_int scanDist" "How far the camera can see the player." "editor_int scanFov" "Camera's field of view." "editor_bool seePlayer" "1 = camera reacts to the player, 0 = camera ignores the player." "editor_float sight_threshold" "From 0.0 to 1.0, how lit up the player's lightgem has to be for the camera to see him." "editor_float sightTime" "Time taken to become fully alerted by the player and trigger the alarm." "editor_float sightResume" "The camera will wait this amount of time before resuming its regular sweep if it saw the player but didn't become fully alerted." "editor_float alarm_duration" "Minimum duration of the fully alert state. Will be extended by half if the player is in view or was recently seen." "editor_float alarm_interval" "Time between alarm sounds when fully alerted." "editor_float wait" "Don't use, use 'alarm_duration' instead." "editor_bool trigger_alarm_start" "Trigger targets when an alarm begins." "editor_bool trigger_alarm_end" "Trigger targets when an alarm ends." "editor_bool start_off" "Camera starts powered off." "editor_int modelAxis" "0, 1 or 2 based on which axis the source model was built on." "editor_bool flipAxis" "Set to 1 to flip the model axis of the cam." "editor_vector viewOffset" "Offset at which the camera's 'eye' is placed. Should be outside the visual model so it doesn't block its own view." "editor_vector lightOffset" "Offset at which the camera's spotlight is placed. Should be outside the visual model so it doesn't block its own spotlight." "editor_bool spotLight" "Toggle to enable or disable a spotlight for the camera. You can specify an existing spotlight with a 'spotlight_custom' spawnarg. Otherwise a spotlight will be spawned." "editor_var spotlight_custom" "Specify an existing light entity as the spotlight, rather than letting the security camera spawn one. Requires 'spotLight' to be set to '1', other spotlight spawnargs will be ignored." "editor_texture spotlight_texture" "Texture projected by the spawned spotlight. You should use a texture designed for projected lights: one that uses a gradient as its falloff image. This ensures that light intensity gradually fades to black, rather than abruptly." "editor_int spotlight_range" "Maximum reach of the spawned spotlight." "editor_int spotlight_diameter" "Diameter of the spawned spotlight's projection. If 0, will automatically be calculated to match spotlight_range and scanFov, for scanFov up to 90°. Formula: spotlight_diameter = 2 * spotlight_range * tan(scanFov / 2)." "editor_bool useColors" "Toggle to disable color changes of the camera's spotlight & lens depending on alert state." "editor_color color_sweeping" "Color of the camera's spotlight & lens when it has not recently seen something suspicious, default green." "editor_color color_sighted" "Color of the camera's spotlight & lens when it has seen something suspicious, default yellow." "editor_color color_alerted" "Color of the camera's spotlight & lens when it has confirmed an intruder, default red." "editor_int health" "Health of the security camera. Setting to 0 will make it invicible." "editor_var break_up_script" "This script is called if the camera is destroyed." "editor_var break_up_target" "This entity is triggered if the camera is destroyed." "editor_bool notice_destroyed" "Whether AIs notice that the security camera has been destroyed (enables the visual stim)." "editor_model broken" "Switch to this model when the security camera is broken." "editor_model broken_flinderized" "Switch to this model when the security camera is broken and flinderized (fragmented). Set the flinderize threshold with 'damage_flinderize'. If no model is set here, will use 'broken' instead." "editor_int damage_flinderize" "Attacks dealing at least this amount of damage can turn the security camera into fragments upon or after destruction. Set to 0 to disable." "editor_int damage_blackjack" "Damage taken from blackjack attacks. Default damage: 0" "editor_int damage_splash_falloff" "Splash damage will decay exponentially by this number, increase this to make splash damage decrease faster with distance." "editor_float damage_mult_sword" "Damage multiplier for sword attacks. Default damage: 42" "editor_float damage_mult_arrow" "Damage multiplier for broadheads and rope arrows. Default damage: 35" "editor_float damage_mult_firearrow_direct" "Damage multiplier for fire arrow and mine direct hits. Fire arrows and mines deal either direct damage or splash damage. Default damage: 400" "editor_float damage_mult_firearrow_splash" "Damage multiplier for fire arrow and mine splash damage. Fire arrows and mines deal either direct damage or splash damage. Default maximal damage: 30" "editor_float damage_mult_moveable" "Damage multiplier for all moveables. Significant mass and velocity are needed to do significant damage. Default maximal damage: mass divided by 5" "editor_float damage_mult_other" "Damage multiplier for anything else. You can create individual damage_ spawnargs by naming the damage def, i.e. 'damage_mult_atdm:damage_rock' '1.0', or the inflicting entity, i.e. 'damage_atdm:attachment_melee_shortsword' '1.0'" "editor_var fx_damage" "Fx to play whenever the camera is damaged while power is on." "editor_var fx_damage_nopower" "Fx to play whenever the camera is damaged while power is off." "editor_var fx_destroyed" "Fx to play whenever the camera is destroyed while power is on." "editor_var fx_destroyed_nopower" "Fx to play whenever the camera is destroyed while power is off." "editor_snd snd_sight" "Sound emitted when the camera notices the player." "editor_snd snd_moving" "Sound emitted when the camera is rotating." "editor_snd snd_stationary" "Sound emitted by a stationary type of camera." "editor_snd snd_alert" "Alarm sound emitted when fully alerted." "editor_snd snd_end" "Sound emitted when the camera is about to reach the end point of a sweep." "editor_snd snd_death" "Sound emitted when the camera is destroyed while power is on. Additional to 'fx_destroyed'." "editor_snd snd_death_nopower" "Alternative death sound if camera is destroyed while power is off. Additional to 'fx_destroyed_nopower'." "editor_snd snd_sparks" "Sound emitted when the camera emits sparks after it was destroyed." "editor_var sprS_alert" "How far snd_alert propagates to AIs." "editor_var cameraTarget" "Obsolete, 'cameraTarget' no longer needs to be set on security cameras since it can now be set directly on the display screen for all entity types." "editor_int cameraFovX" "Display screens showing the camera's view will have this field of view in X. If not set, scanFov will be used instead." "editor_int cameraFovY" "Display screens showing the camera's view will have this field of view in Y. If not set, scanFov will be used instead." "editor_bool sparks" "1 = When the camera is destroyed, spawn a post-destruction particle func_emitter and play snd_sparks." "editor_model sparks_particle" "Particle that is spawned upon destruction." "editor_var sparks_delay" "Delay the initial appearance of the particle emitter after the camera is destroyed." "editor_bool sparks_power_dependent" "Only show the particle if power to the camera is switched on." "editor_float sparks_interval" "For non-looping particles, minimum time between each trigger of the particle emitter + snd_sparks." "editor_float sparks_interval_rand" "For non-looping particles, additional random factor added to the time between each trigger of the particle + snd_sparks." "editor_skin skin" "Only for in-editor display." "editor_skin skin_on" "Skin used when on." "editor_skin skin_on_spotlight_off" "For models with inbuilt lamps and/or light rays. Used when the security camera is on but its spotlight was toggled off via a button (see AI/Machines prefabs) or script." "editor_skin skin_off" "Skin used when off." "editor_skin skin_broken" "Switch to this skin when broken." "editor_skin skin_flinderized" "Switch to this skin when broken & flinderized. If no skin is set here, will use 'skin_broken' instead." "spawnclass" "idSecurityCamera" "scriptobject" "tdm_security_camera" "legacy" "1" "model" "models/darkmod/mechanical/security_camera.ase" "clipmodel" "models/darkmod/misc/clipmodels/security_camera_cm.lwo" "broken" "models/darkmod/mechanical/security_camera_broken.ase" "broken_flinderized" "-" "start_off" "0" // camera starts powered on "rotate" "1" "seePlayer" "1" "sweepAngle" "90" "sweepSpeed" "5" "sight_threshold" "0.1" "scanFov" "90" "scanDist" "200" "sightTime" "5" "sightResume" "1.5" "sweepWait" "0.5" "lightOffset" "6 0 8" "viewOffset" "8 0 0" "useColors" "1" "alarm_duration" "20" "alarm_interval" "5" "trigger_alarm_start" "1" "trigger_alarm_end" "0" "follow" "0" "follow_tolerance" "15" "follow_speed_mult" "2.5" "follow_incline" "0" "follow_incline_tolerance" "10" "follow_incline_speed" "20" "follow_constrain_up" "90" "follow_constrain_down" "90" "follow_constrain_cw" "180" "follow_constrain_ccw" "180" "color_sweeping" "0.3 0.7 0.4" "color_sighted" "0.7 0.7 0.3" "color_alerted" "0.7 0.3 0.3" "health" "100" "break_up_script" "-" "break_up_target" "-" "notice_destroyed" "1" "damage_flinderize" "90" "damage_blackjack" "0" "damage_splash_falloff" "3" "damage_mult_sword" "0.0" "damage_mult_arrow" "0.0" "damage_mult_firearrow_direct" "1.0" "damage_mult_firearrow_splash" "3.5" "damage_mult_moveable" "0.0" "damage_mult_other" "0.0" "fx_damage" "fx/metaldamage_small_sparks" "fx_damage_nopower" "fx/metaldamage_small" "fx_destroyed" "fx/metaldamage_sparks" "fx_destroyed_nopower" "fx/metaldamage" "skin_on" "security_camera_on" "skin_off" "security_camera_off" "skin_on_spotlight_off" "security_camera_on_spotlight_off" "skin_broken" "security_camera_off" "skin_flinderized" "-" "spotLight" "0" "spotlight_custom" "-" "spotlight_texture" "lights/biground1" "spotlight_range" "0" "spotlight_diameter" "0" "snd_sight" "security_camera_sight" "snd_moving" "security_camera_moving" "snd_stationary" "security_camera_stationary" "snd_alert" "security_camera_alert" "snd_end" "security_camera_end" "snd_death" "sizzle" "snd_death_nopower" "silence" "snd_sparks" "security_camera_spark" "sprS_alert" "alarm_mild" // Propagated alarm sound "sparks" "1" "sparks_particle" "sparks_wires_oneshot.prt" "sparks_delay" "3" "sparks_power_dependent" "1" "sparks_interval" "3" "sparks_interval_rand" "2" //visual stim: enabled when camera is destroyed "sr_class_1" "S" "sr_time_interval_1" "977" "sr_type_1" "STIM_VISUAL" "sr_state_1" "0" "sr_radius_1" "500" "AIUse" "AIUSE_BROKEN_ITEM" } entityDef atdm:security_camera01 { "inherit" "func_securitycamera" "legacy" "" "editor_displayFolder" "AI/Machines/Security Camera" "editor_usage" "Immobile sentry that watches for the player." "editor_usage1" "Can sound an alarm, illuminate an area with a spotlight and track the player's movements horizontally." "editor_usage2" "Sweeps back and forth over 'sweepAngle' degrees unless 'rotate' is set to 0. Start direction is clockwise." "editor_usage3" "Only vulnerable to fire arrows by default. Can be switched on/off by triggering it from a button or lever." "editor_usage4" "Designed to be mounted on a func_static wall/ceiling mount." "model" "models/darkmod/mechanical/security_camera.ase" "broken" "models/darkmod/mechanical/security_camera_broken.ase" "nonsolid" "" "lightOffset" "6 0 0" "viewOffset" "12 0 0" "sweepSpeed" "15" "follow" "1" "skin_on" "security_camera01_on" "skin_off" "security_camera01_off" "skin_on_spotlight_off" "security_camera01_on_spotlight_off" "skin_broken" "security_camera01_broken" "scanFov" "60" "scanDist" "450" "sightTime" "2.5" "spotLight" "1" "trigger_alarm_end" "1" "color_sweeping" "0.18 0.42 0.25" "color_sighted" "0.42 0.40 0.18" "color_alerted" "0.46 0.14 0.17" "spotlight_texture" "lights/spotlight_security_camera" "spotlight_range" "450" "spotlight_diameter" "0" //automatically calculated to match range & scanFov }