Anyone able to get creatures to drop loot?

a year ago an update stopped all wildlife from dropping loot, even when drop loot is checked. I’ve filed multiple bug reports with no luck. Is anyone able to get them to drop ammo/ items like they used to?

Hey @swaggod how are you?

I found this tutorial that could help you.

You only need to replace the creatire spawner device with a wildlife spawner device and it should work.

This is the only way I found to make wildlife drop items with the engine as it is right now.

Hope this helps you!

I am using a wildlife spawner with no luck :sob: my b it was a typo in the title

Hello again @swaggod !

I followed that tutorial in my Island and it works perfectly. Have you implemented the code exactly as explained in the tutorial?

Just in case, here is the code, replacing the creature spawner device (used in the tutorial) by a wildlife spawner device (the one you want to use)


using { /Fortnite.com/Devices }
using { /Fortnite.com/Characters }
using { /Verse.org/Random }
using { /Verse.org/Simulation }
using { /UnrealEngine.com/Temporary/Diagnostics }
using { /UnrealEngine.com/Temporary/SpatialMath }

# See https://dev.epicgames.com/documentation/en-us/uefn/create-your-own-device-in-verse for how to create a verse device.

loot_drop_data := class<concrete>:
    @editable
    CreatureSpawnerDevice : wildlife_spawner_device = wildlife_spawner_device{}

    @editable
    ItemSpawnerDevice : item_spawner_device = item_spawner_device{}

    @editable
    DropChance : type {_X:float where 0.0 <= _X, _X <= 1.0} = 0.0

    var MaybeMainDevice : ?loot_drop_device = false

    OnCreatureEliminated(DeviceAIInteractionResult : device_ai_interaction_result):void=
        if(MainDevice := MaybeMainDevice?):
            MainDevice.OnCreatureEliminated(DeviceAIInteractionResult, Self)



# A Verse-authored creative device that can be placed in a level
loot_drop_device := class(creative_device):

    @editable
    LootDropsData : []loot_drop_data = array{}

    # Runs when the device is started in a running game
    OnBegin<override>()<suspends>:void=

        for (LootDropData : LootDropsData):
            set LootDropData.MaybeMainDevice = option{ Self }
            LootDropData.CreatureSpawnerDevice.EliminatedEvent.Subscribe(LootDropData.OnCreatureEliminated)


    OnCreatureEliminated(DeviceAIInteractionResult : device_ai_interaction_result, LootDropData : loot_drop_data):void=
        RandomChance : float = GetRandomFloat(0.01, 1.0)
        if ( LootDropData.DropChance < RandomChance ):
            return
        
        if (TargetAgent := DeviceAIInteractionResult.Target?, TargetFortCharacter := TargetAgent.GetFortCharacter[]):

            Location := TargetFortCharacter.GetTransform().Translation
            if (LootDropData.ItemSpawnerDevice.TeleportTo[Location, IdentityRotation()]):
                LootDropData.ItemSpawnerDevice.SpawnItem()

Additionaly, this is the config you need to do in your Item Spawner device to make it work:


And here is a video of this feature working on my testing Island:

Let me know if you need more help with this!

Thanks I got it to work with item granter instead of spawner, because when an item spawner teleports or spawns more items it deletes the previous one. Would be nice if the built in functionality on wildlife spawners would just work again tho, as it is much cleaner and there have been multiple bug reports on the issue for a year.

1 Like