Microsoft Azure PlayFab logo
    • Multiplayer
    • LiveOps
    • Data & Analytics
    • Add-ons
    • For Any Role

      • Engineer
      • Designer
      • Executive
      • Marketer
    • For Any Stage

      • Build
      • Improve
      • Grow
    • For Any Size

      • Solo
      • Indie
      • AAA
  • Runs on PlayFab
  • Pricing
    • Blog
    • Forums
    • Contact us
  • Sign up
  • Sign in
  • Ask a question
  • Spaces
    • PlayStream
    • Feature Requests
    • Add-on Marketplace
    • Bugs
    • API and SDK Questions
    • General Discussion
    • LiveOps
    • Topics
    • Questions
    • Articles
    • Ideas
    • Users
    • Badges
  • Home /
  • General Discussion /
avatar image
Question by John Peterson · Sep 28, 2017 at 12:42 AM · CloudScriptapisIn-Game Economy

Granting a Bundle creates an ItemInstance of the Bundle?

Title ID: 44B1

Dear PlayFab community,

As per this link, I think I understand (and have empirically discovered) that granting a player a bundle will result in the bundle itself residing the player's inventory (even if it has a usage count of 1).

However, like the poster of that link, I'd like to grant the items from a bundle and not have the bundle instance itself in the inventory.

What is the recommended "best practices" to accomplish that task? Maybe a server-side CloudScript that would take a BundleID, grant it, and then find that instance in the inventory and revoke it? Or maybe determine if the ItemID is a Bundle, retrieve the contents of the Bundle, and grant only those items? These approaches seem a little...cumbersome. I'm hoping there's an easier/better way.

Thanks in advance for any help anyone can provide!

Comment

People who like this

0 Show 0
10 |1200 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users

1 Reply

· Add your reply
  • Sort: 
avatar image
Best Answer

Answer by Brendan · Sep 28, 2017 at 02:31 AM

Correct - a bundle is an item that comes with other items included. It is, itself, an item. To have the bundle clean itself up after adding the items it comes with, set it to have a UsagePeriod of a few seconds. That way, it'll add its "contents" to the player account, then go away.

Comment
John Peterson

People who like this

1 Show 3 · Share
10 |1200 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image John Peterson · Sep 28, 2017 at 02:41 AM 0
Share

Oh, okay -- setting the UsagePeriod would likely work well for me. However, I got the sense that might have issues with something (as per the details in that link)?

avatar image Brendan ♦♦ John Peterson · Sep 28, 2017 at 07:02 AM 0
Share

In the linked thread, they set the Usage Count, not the Usage Period. Using the Usage Period means that the item is on a timer and will go away when you want it to.

avatar image John Peterson Brendan ♦♦ · Sep 28, 2017 at 02:04 PM 0
Share

Ah, I didn't register that the linked thread was leveraging UsageCount. Gotcha. Thanks!

Your answer

Hint: You can notify a user about this post by typing @username

Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.

Navigation

Spaces
  • General Discussion
  • API and SDK Questions
  • Feature Requests
  • PlayStream
  • Bugs
  • Add-on Marketplace
  • LiveOps
  • Follow this Question

    Answers Answers and Comments

    2 People are following this question.

    avatar image avatar image

    Related Questions

    Add Friend using friend request with accept/decline option 6 Answers

    Continuous resource incrementation over time 1 Answer

    Development workflow within PlayFab 2 Answers

    Can a Drop Table be configured to drop zero items? 1 Answer

    Is there a server API to get a list of the Drop Tables? 1 Answer

    PlayFab

    • Multiplayer
    • LiveOps
    • Data & Analytics
    • Runs on PlayFab
    • Pricing

    Solutions

    • For Any Role

      • Engineer
      • Designer
      • Executive
      • Marketer
    • For Any Stage

      • Build
      • Improve
      • Grow
    • For Any Size

      • Solo
      • Indie
      • AAA

    Engineers

    • Documentation
    • Quickstarts
    • API Reference
    • SDKs
    • Usage Limits

    Resources

    • Forums
    • Contact us
    • Blog
    • Service Health
    • Terms of Service
    • Attribution

    Follow us

    • Facebook
    • Twitter
    • LinkedIn
    • YouTube
    • Sitemap
    • Contact Microsoft
    • Privacy & cookies
    • Terms of use
    • Trademarks
    • Safety & eco
    • About our ads
    • © Microsoft 2020
    • Anonymous
    • Sign in
    • Create
    • Ask a question
    • Create an article
    • Post an idea
    • Spaces
    • PlayStream
    • Feature Requests
    • Add-on Marketplace
    • Bugs
    • API and SDK Questions
    • General Discussion
    • LiveOps
    • Explore
    • Topics
    • Questions
    • Articles
    • Ideas
    • Users
    • Badges