automated_turret_device

device
automated_turret_device<public> := class<concrete><final>(creative_device_base, healthful, healable)

Used to create a customizable turret that can search for nearby targets.

Module
/Fortnite.com/Devices
Source
fortnite

Used in

turret_score_manager := class(creative_device):

    # We reference our Automated Turret device here.
    # Drag your placed device onto this property in the editor.
    @editable
    Turret : automated_turret_device = automated_turret_device{}

    # This is a Variable.
    # It holds the current score.
    # It starts at zero.
    var Score : int = 0

    # OnBegin runs automatically when the game starts.
    OnBegin<override>()<suspends> : void =
        # We wait for an Event.
        # DestroyedEvent fires when the turret is destroyed, or we can use TargetFoundEvent.
        # This means an enemy was hit by this turret.
        loop:
            # Block here until the turret finds a target (eliminates someone).
            Turret.TargetFoundEvent.Await()

            # When the event happens...
            # Add one to our score.
            set Score = Score + 1

            # Print the score to the screen.
            # This helps us see it working.
            Print("Score: {Score}")
GamePlay / Security Alarm Device verse-source
AutomatedTurrets : []automated_turret_device = array{}

    # If true, turrets will forget their target when alarm is silenced
    @editable
    ClearTurretsOnSilence : logic = true

    # Time before turrets acquire target after alarm (seconds)