Quantcast
Channel: General - Epic Developer Community Forums
Viewing all articles
Browse latest Browse all 9593

item_granter_device is buggy.

$
0
0

Please select what you are reporting on:

Unreal Editor for Fortnite

What Type of Bug are you experiencing?

Verse

Summary

The Item Granter device is buggy and doesn’t properly grant items.

Steps to Reproduce

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

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

# A Verse-authored creative device that can be placed in a level
hello_world_device := class(creative_device):
    @editable ItemGranter: item_granter_device = item_granter_device{}
    @editable ConditionalButton: conditional_button_device = conditional_button_device{}
    # Runs when the device is started in a running game
    OnBegin<override>()<suspends>:void=
        Sleep(10.0)
        for (Player: GetPlayspace().GetPlayers()):
            ItemGranter.GrantItem(Player)
            ItemGranter.GrantItem(Player)
            ItemGranter.GrantItem(Player)
            ItemGranter.GrantItem(Player)
            for (Frame := 0..10):
                Print("Frame {Frame}: {ConditionalButton.GetItemCount(Player, 0)}")
                Sleep(0.0)
            

Expected Result

The prints should be:
LogVerse: : Frame 0: 4
LogVerse: : Frame 1: 4
LogVerse: : Frame 2: 4
LogVerse: : Frame 3: 4
LogVerse: : Frame 4: 4
LogVerse: : Frame 5: 4
LogVerse: : Frame 6: 4
LogVerse: : Frame 7: 4
LogVerse: : Frame 8: 4
LogVerse: : Frame 9: 4
LogVerse: : Frame 10: 4

Observed Result

The prints are:
LogVerse: : Frame 0: 0
LogVerse: : Frame 1: 1
LogVerse: : Frame 2: 1
LogVerse: : Frame 3: 2
LogVerse: : Frame 4: 2
LogVerse: : Frame 5: 3
LogVerse: : Frame 6: 3
LogVerse: : Frame 7: 4
LogVerse: : Frame 8: 4
LogVerse: : Frame 9: 4
LogVerse: : Frame 10: 4

Platform(s)

All

Island Code

0064-6931-6604

Additional Notes

Check my private uploaded map to reproduce it.

1 post - 1 participant

Read full topic


Viewing all articles
Browse latest Browse all 9593

Trending Articles