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!