[SW] Hero Transformations cause stale Fort Character in Verse

Summary

When transforming a player into one of the new Hero Transformations, Fort Character becomes stale in Verse.

Please select what you are reporting on:

Verse

What Type of Bug are you experiencing?

Character

Steps to Reproduce

  • Place Provided Verse code in your project
  • Add required devices in the level
  • Start game
  • Apply hero transformation to the player
  • Player get eliminated and doesn’t recieve HUD message

Expected Result

When Hero Transformation is applied, the Fort Character doesn’t become stale.

Observed Result

Fort Character becomes stale.

Platform(s)

PC / ALL

Upload an image

Additional Notes

For easy repo use this verse code.

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

A Verse-authored creative device that can be placed in a level

debug_hero_transformation_device := class(creative_device):

@editable HeroDevice : hero_device = hero_device{}
@editable TeamSettings : team_settings_and_inventory_device = team_settings_and_inventory_device{}
@editable NotificationHud : hud_message_device = hud_message_device{}
@editable BecomeHeroButton :  button_device = button_device{}

EliminationNotificationMessage <localizes> <public> : message = "Successfully Eliminated!"
CouldntGetAgentFromResultMessage <localizes> <public> : message = "Could not get Eliminated Agent from elimination result."

# Runs when the device is started in a running game
OnBegin<override>()<suspends>:void=
    Print("debug_hero_transformation_device has started.")
    BecomeHeroButton.InteractedWithEvent.Subscribe(OnBecomeHeroButtonInteracted)
    loop:
        SpawnedAgent := TeamSettings.TeamMemberSpawnedEvent.Await()
        if (SpawnedPlayer := player[SpawnedAgent]):
            if (FortChar := SpawnedPlayer.GetFortCharacter[]):
                FortChar.EliminatedEvent().Subscribe(PlayerEliminated)

# Handler for player eliminations that shows a notification on the eliminated player's screen.
PlayerEliminated(Result:elimination_result):void=
    Print("Player Eliminated")
    if (EliminatedAgent := Result.EliminatedCharacter.GetAgent[]):
        NotificationHud.Show(EliminatedAgent, EliminationNotificationMessage)
    else:
        NotificationHud.Show(CouldntGetAgentFromResultMessage)

# Handler for when the Become Hero Button is interacted with — applies the hero transformation to the interacting player.
OnBecomeHeroButtonInteracted(InteractingAgent:agent):void=
    Print("Become Hero Button Interacted")
    if (Player := player[InteractingAgent]):
        HeroDevice.ApplyTransformation(Player)
using { /Fortnite.com/Characters }
using { /Fortnite.com/Devices }
using { /Fortnite.com/Game }
using { /Verse.org/Simulation }
using { /UnrealEngine.com/Temporary/Diagnostics }

A Verse-authored creative device that can be placed in a level

debug_hero_transformation_device := class(creative_device):

@editable HeroDevice : hero_device = hero_device{}
@editable TeamSettings : team_settings_and_inventory_device = team_settings_and_inventory_device{}
@editable NotificationHud : hud_message_device = hud_message_device{}
@editable BecomeHeroButton :  button_device = button_device{}

EliminationNotificationMessage <localizes> <public> : message = "Successfully Eliminated!"
CouldntGetAgentFromResultMessage <localizes> <public> : message = "Could not get Eliminated Agent from elimination result."

# Runs when the device is started in a running game
OnBegin<override>()<suspends>:void=
    Print("debug_hero_transformation_device has started.")
    BecomeHeroButton.InteractedWithEvent.Subscribe(OnBecomeHeroButtonInteracted)
    loop:
        SpawnedAgent := TeamSettings.TeamMemberSpawnedEvent.Await()
        if (SpawnedPlayer := player[SpawnedAgent]):
            if (FortChar := SpawnedPlayer.GetFortCharacter[]):
                FortChar.EliminatedEvent().Subscribe(PlayerEliminated)

# Handler for player eliminations that shows a notification on the eliminated player's screen.
PlayerEliminated(Result:elimination_result):void=
    Print("Player Eliminated")
    if (EliminatedAgent := Result.EliminatedCharacter.GetAgent[]):
        NotificationHud.Show(EliminatedAgent, EliminationNotificationMessage)
    else:
        NotificationHud.Show(CouldntGetAgentFromResultMessage)

# Handler for when the Become Hero Button is interacted with — applies the hero transformation to the interacting player.
OnBecomeHeroButtonInteracted(InteractingAgent:agent):void=
    Print("Become Hero Button Interacted")
    if (Player := player[InteractingAgent]):
        HeroDevice.ApplyTransformation(Player)


The Verse code pasted in weird, so here is the code once again!

1 Like

FORT-1087467 has been ‘Closed’. We’re unable to reproduce this issue.