Summary
When connected via Verse and event bindings, the Save Point Device fails to clear player data when the Clear Player
option is triggered using a trigger_device
. This issue specifically occurs when the island’s Spawn Limit is set to 1. If the spawn limit is greater than 1, the clear function works as expected.
Please select what you are reporting on:
Unreal Editor for Fortnite
What Type of Bug are you experiencing?
Devices
Steps to Reproduce
Devices Required:
- 1 Save Point Device
- 3 Trigger Devices (
save_trigger
,clear_trigger
,was_cleared_trigger
) - (Optional) Item Spawner and Guard Spawner for context testing
Verse Code:
using { /Fortnite.com/AI }
using { /Fortnite.com/Characters }
using { /Fortnite.com/Devices }
using { /Fortnite.com/Game }
using { /UnrealEngine.com/Temporary/Diagnostics }
using { /UnrealEngine.com/Temporary/SpatialMath }
using { /UnrealEngine.com/Temporary/UI }
using { /Verse.org/Random }
using { /Verse.org/Simulation }
<#
Setup:
- Save Trigger → Save Player
- Clear Trigger → Clear Player
- Was Cleared Trigger → Clear Trigger OnTriggered
#>
save_point_test_device := class(creative_device):
@editable
save_trigger : trigger_device = trigger_device{}
@editable
clear_trigger : trigger_device = trigger_device{}
@editable
was_cleared_trigger : trigger_device = trigger_device{} # Used to print a statement that the clear trigger actually executed.
OnBegin<override>(): void =
save_trigger.TriggeredEvent.Subscribe(OnSaveTriggerPressed)
was_cleared_trigger.TriggeredEvent.Subscribe(OnWasClearedTriggerPressed)
Players := GetPlayspace().GetPlayers()
for (Player : Players):
if (fc := Player.GetFortCharacter[]):
fc.EliminatedEvent().Subscribe(OnEliminated)
OnEliminated(res: elimination_result): void =
if (Agent := res.EliminatedCharacter.GetAgent[]):
Print("Triggering Clear Trigger!") # Confirmed in logs
clear_trigger.Trigger(Agent)
OnSaveTriggerPressed(Agent: ?agent): void =
Print("Save Triggered!") # Confirmed in logs
OnWasClearedTriggerPressed(Agent: ?agent): void =
Print("Save Point Clear called!") # Confirmed in logs
In-Editor Setup:
- Place all devices in the level.
- In the Save Point Device:
- Set
Save Player
to thesave_trigger
’sOnTriggered
event. - Set
Clear Player
to theclear_trigger
’sOnTriggered
event.
- Set
- In the was_cleared_trigger:
- Set its
Trigger
to theclear_trigger
’sOnTriggered
event.
- Set its
- (Optional) Add item/guard spawners for saved state testing.
Reproduction Steps:
- Set Island Spawn Limit to 1.
- Start a session and collect a weapon or item.
- Trigger the Save Trigger by walking over it.
- End the game.
- Restart and allow yourself to be eliminated.
- End and restart the game again.
Expected Result
The Save Point Device should clear the player’s saved data upon elimination, resulting in a fresh inventory on game restart.
Observed Result
The player respawns in the new game with previously saved items, indicating the Clear Player
logic did not fully execute.
Platform(s)
Windows
Additional Notes
- Using button devices for save/clear functionality works correctly.
- The issue only occurs when the trigger device is used while
Spawn Limit = 1
. - When
Spawn Limit > 1
, the Save Point Device clears data as expected. - All logs confirm that the
clear_trigger
is being called, suggesting the issue lies in how the Save Point Device handles trigger events under restricted spawn conditions.