FindCreativeObjectsWithTag

method
(InCreativeDevice: creative_device).FindCreativeObjectsWithTag<public>(Tag: tag)<transacts>: generator(creative_object_interface)

DEPRECATED - use corresponding extension methods that takes a tag type instead of a tag instance. Generates a `creative_object_interface` for every creative object that has been marked with the specified `Tag`. Will not find anything if called on a default constructed object.

Module
/Fortnite.com/Devices
Declared in
Devices
Source
fortnite

Used in

Change the Car's Colours verse-library
ApplyPaint(Paint : material) : void =
    for (Obj : FindCreativeObjectsWithTag(car_body_tag)):
        if (Body := creative_prop[Obj]):
            Body.SetMaterial(Paint, ?Index := 0)
Change the Car's Colours verse-library
var PaintIndex : int = 0

    OnBegin<override>()<suspends> : void =
        for (Obj : FindCreativeObjectsWithTag(car_paint_button_tag)):
            if (Button := button_device[Obj]):
                Button.InteractedWithEvent.Subscribe(OnPaintPressed)
                Print("CarColors: paint button wired.")

    OnPaintPressed(Agent : agent) : void =
        # Advance to the next paint, wrapping 2 -> 0. Mod can fail (decides), so
Build the Car Primitive verse-library
# How long (seconds) the nudge takes.
    @editable
    NudgeSeconds : float = 0.6

    OnBegin<override>()<suspends> : void =
        # Find the ignition button(s) by tag and react to each press.
        for (Obj : FindCreativeObjectsWithTag(car_ignition_tag)):
            if (Ignition := button_device[Obj]):
                Ignition.InteractedWithEvent.Subscribe(OnIgnition)
                Print("CarPrimitive: ignition wired.")
        # Confirm we actually found a car body to drive.
        for (Obj : FindCreativeObjectsWithTag(car_body_tag)):
            if (Body := creative_prop[Obj]):
                Print("CarPrimitive: car body found and ready.")
Tag-based working-island loop (button spins tagged props) verse-library
# prop tagged `working_loop_target_tag` are discovered via
# FindCreativeObjectsWithTag. When the button is interacted with, every tagged
# prop spins one third-turn at a time for several hops (the verified
# keyframed-style MoveTo rotation idiom).

# Custom tags. A tag is any class deriving from `tag`. Put the matching tag
# string on the actors in the editor (set_editor_property('tags', [...])) so
# this device discovers them with NO @editable references.
RepaintCar(Paint : material) : void =
        for (Obj : FindCreativeObjectsWithTag(car_body_tag)):
            if (Body := creative_prop[Obj]):
                Body.SetMaterial(Paint, ?Index := 0)
        Print("CarCapstone: repainted.")

    # Runs while a driver is seated: each ~tick, read held inputs and move the car.
    DriveLoop(Agent : agent)<suspends> : void =
TriadInfiltration / Design Cinematic Flythrough verse-source
ObjectsToShow := CinematicSequence.FindCreativeObjectsWithTag(cinematic_objects{})

        for (Object : ObjectsToShow):
            if (Billboard := billboard_device[Object]):
                Billboard.ShowText()
            else if (Device := creative_device[Object]):
                Device.Show()
GamePlay / Cinematic Flythrough verse-source
ObjectsToShow := CinematicSequence.FindCreativeObjectsWithTag(cinematic_objects{})

        for (Object : ObjectsToShow):
            if (Billboard := billboard_device[Object]):
                Billboard.ShowText()
            else if (Device := creative_device[Object]):
                Device.Show()
GamePlay / Door Autoclose Device verse-source
FindTaggedDoors()<transacts>:void =
        # Find all doors with open tag
        for (Object : FindCreativeObjectsWithTag(door_open_tag{})):
            if (DoorDevice := lock_device[Object]):
                set OpenTaggedDoors += array{DoorDevice}
        
        # Find all doors with closed tag
        for (Object : FindCreativeObjectsWithTag(door_closed_tag{})):
            if (DoorDevice := lock_device[Object]):
                set ClosedTaggedDoors += array{DoorDevice}
        
        # Find all doors with locked tag
        for (Object : FindCreativeObjectsWithTag(door_locked_tag{})):
            if (DoorDevice := lock_device[Object]):
                set LockedTaggedDoors += array{DoorDevice}
        
        # Find all doors with unlocked tag
        for (Object : FindCreativeObjectsWithTag(door_unlocked_tag{})):
            if (DoorDevice := lock_device[Object]):
                set UnlockedTaggedDoors += array{DoorDevice}
VhsSystem / Vhs Controller Device verse-source
TaggedObjects := FindCreativeObjectsWithTag(vhs_tape_tag{})
        
        var CollectibleCount : int = 0
        for (TaggedObject : TaggedObjects):
            if (CollectibleDevice := collectible_object_device[TaggedObject]):
                # Subscribe to collection event
                Subscriptions.Add(CollectibleDevice.CollectedEvent.Subscribe(OnTapeCollected))
JoustingGame / Jousting Score Controller verse-source
FindAllCollectibles():void =
        TaggedObjects := FindCreativeObjectsWithTag(VictoryTag)
        for (TaggedObject : TaggedObjects):
            if ( CollectibleDevice := collectible_object_device[TaggedObject]):
                set CollectibleSubs += array{CollectibleDevice.CollectedEvent.Subscribe(OnCollectibleCollected)}
                Logger.Print("Collectible found - Adding to Victory Point List")

    # Handle collectible collection event - DEPRECATED