[logic]
active = sr_idle@alarm

[sr_idle@alarm]
on_info = {+esc_actor_target =smart_captured_by_faction(esc_smart_terrain_3_16:army)} sr_idle@alarms %=play_sound(esc_mil_target_detected)%
 
[sr_idle@alarms]
on_signal = sound_end | sr_idle@alarm1 %+esc_fire +esc_alarm +esc_alarm_alarm%

[sr_idle@alarm1]
on_info = {=smart_captured_by_faction(esc_smart_terrain_3_16:army) +esc_alarm_alarm} sr_idle@wait %=play_sound(alarm)%

[sr_idle@wait]
on_info = {=dist_to_actor_ge(150) =smart_captured_by_faction(esc_smart_terrain_3_16:army)} sr_idle@alarm %-esc_actor_target%
on_info2 = {=dist_to_actor_le(100) =smart_captured_by_faction(esc_smart_terrain_3_16:army)} sr_idle@sirena %=play_sound(alarm)%

[sr_idle@sirena]
on_signal = sound_end | sr_idle@wait

