Verse Library verse

01 Api

Searches for tagged props and devices, casts them to specific types, and prints positions.

extracted-snippets/documentation/en-us/uefn/24-01-release-notes-in-unreal-editor-for-fortnite/01-api.verse

# Source URL: https://dev.epicgames.com/documentation/en-us/uefn/24-01-release-notes-in-unreal-editor-for-fortnite
# Local doc:  epic-docs/documentation/en-us/uefn/24-01-release-notes-in-unreal-editor-for-fortnite.md
# Section:    API
        # Some test code for finding all of these that have an all_tag on them and then casting to the appropriate type
        AllCreativeObjects:[]creative_object_interface := GetCreativeObjectsWithTag(all_tag{})

        for (PropItem:AllCreativeObjects):
            if (TheProp := creative_prop[PropItem]):
                Logger.Print("Prop found with all_tag at position: {TheProp.GetTransform().Translation}")

        for (DeviceItem:AllCreativeObjects):
            if (TheDevice := creative_device_base[DeviceItem]):
                Logger.Print("Creative device found with all_tag at position: {TheDevice.GetTransform().Translation}")
        
        for (UserDeviceItem:AllCreativeObjects):
            if (TheDevice := creative_device[UserDeviceItem]):
                Logger.Print("User device found with all_tag at position: {TheDevice.GetTransform().Translation}")
Copy full snippet

Comments

    Sign in to vote, comment, or suggest an edit. Sign in