Capture Item Spawner events bugged or have I just not set them up correctly?

I’ve got a Capture Item Spawner set using an editable decorator on a custom device. I’ve set it up to subscribe to all the events and write a message to the log when they’re fired.

Here are the settings for the Capture Item Spawner device:

And here is the custom device utilising the Capture Item Spawner:

using { /Fortnite.com/Devices }
using { /Verse.org/Simulation }

example_device := class(creative_device) {
    @editable
    CaptureItemSpawner: capture_item_spawner_device = capture_item_spawner_device {}

    OnBegin<override>()<suspends>: void = {
        CaptureItemSpawner.ItemCapturedEvent.Subscribe(OnCapture)
        CaptureItemSpawner.ItemPickedUpEvent.Subscribe(OnPickedUp)
        CaptureItemSpawner.ItemDroppedEvent.Subscribe(OnDropped)
        CaptureItemSpawner.ItemReturnedEvent.Subscribe(OnReturned)
    }

    OnCapture(Player: agent): void = {
        Print("captured...")
    }

    OnPickedUp(Player: agent): void = {
        Print("picked up...")
    }

    OnDropped(Player: agent): void = {
        Print("dropped...")
    }

    OnReturned(Player: agent): void = {
        Print("returned...")
    }
}

When a player picks up the item from the device:
Message: Resykz took your Authority Keycard
Log: picked up…

When a player drops the item to the ground:
Message: Resykz dropped your Authority Keycard
Log: dropped…

When a player picks up the item from the ground:
Message: Resykz took your Authority Keycard
Log: picked up…

When a card is auto returned to the device (based on Return Dropped Items):
Message: Authority Keycard has been returned
Log:

It seems the internal ItemReturnedEvent is firing as we get the predefined event message in the HUD, but the subscribed ItemReturnedEvent isn’t firing as nothing is written to the log.

So my first question is, is this a bug or have I missed something with my subscriptions, as far as I can tell it’s set up correctly but another set of eyes never does any harm.

Just as a note I’ve yet to be able to test this with other players, either on the same team or opposite team, this is just me in the lobby on my own, I’m not sure if that makes any difference.

My second question is. what triggers the ItemCapturedEvent? None of the actions of picking the item up from the device or from the ground after its dropped seem to trigger this, either internally or through a subscription. This could be an event that’s triggered by other players picking up the item after another player has picked it up, claimed ownership and then dropped it? I’m not sure, if any one knows I’d be glad to learn!

1 Like

I have also experienced ItemReturnedEvent not signaling anything to my code, so I believe it’s a bug.

My current work around is to use a Trigger to pass along the event to my code: Relic Royale | Uefn Code Snippet

1 Like

Also, to trigger a ItemCapturedEvent I believe you need to bring the item to a Capture Area

1 Like

Just had a read through your Relic Royale snippet and that looks like it could work, I’ll give this a go hopefully today or tomorrow, thanks!

As for the ItemCapturedEvent and using it with a Capture Area, my current set up is a Capture Area with a Capture Item Spawner in the same place. I’m susbcribed to the Capture Area captured event which then enables the Capture Item Spawner so a player can pick it up after. Do you mind explaining in a bit more detail the setup between the two? I would really appreciate it!

Edit

Ah I’ve just seen in the docs there’s a ItemIsConsumedEvent and a ItemIsDeliveredEvent on the Capture Area device. I’m assuming there’s corresponding settings to set it up for receiving an item that I hadn’t seen. Is this what you meant in your reply?

I was referring to this event that CaptureItemSpawner emits: Fortnite Verse Digests: Release-24.10-CL-24903530 (github.com)

Ah ok, I see, I guess cause I’m starting with the Capture Area as enabled/allowed and the Capture Item Spawner as disabled. It then sets the Capture Area to disallow once its been captured, where I also set the Capture Item Spawner to enabled so the item can be picked up, ItemCapturedEvent on the Capture Item Spawner would never fire since the Capture Area I’m standing on after capturing it is now set to disallow. Got it, so obvious too ha, thanks!

1 Like

@capen_r can you confirm that this bug is still present?

Because I also have the same issue with call of function that is subscribed to “ItemReturnedEvent” from “Capture Item Spawner” device.

1 Like

most definitely is

1 Like