The new conditional button `GetItemCount()` function

I was happy to see that conditional buttons got a new GetItemCount() function, tried to implement it different ways, but failed at it.

So I went ahead and made a new project, I’ve set up 8 different conditional buttons with varying Allow Interaction, Key Items Required and Consume key items parameters to test it but none of them work and apparently :

  • The conditional buttons get activated but they won’t consume the key items
  • The new GetItemCount(Agent, 1) function always returns 0, which is weird because it used to return -1 when I tried on my main island.
  • Also, calling GetItemCount(Agent, 0) returns 2147483647 which might be harmless if we consider that the indexes start at 1.

To sum it up, I’ve only been able to get all the other results except the good one.

NOTE: The conditional buttons work on my main island, so I’m only asking for how to make the GetItemCount() function to work actually, but all ideas are accepted.

Has anyone else managed to make it work ?

Thank you for your report! We would like to look into this further, would you be able to submit a bug report using the form available here: Fortnite Creative

1 Like

Do you by chance have infinite resources in the island settings? If you do, the button won’t consume the items such as the shards / fragment things. Edit: This might also be why the GetItemCount Function is returning an unexpected number

2 Likes

Thank you dude, seem to work perfectly now, I feel dumb, it still returns -1 on my main island so I have to investigate, I’ll update this if needed.

Ok my problem was actually that I’m calling the function on a dead player, which won’t work, I’m gonna open another topic for that. Thanks for your help!

1 Like

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.