Skip to main content
Inspiring
January 12, 2026
Solved

Is buying from the shop with in-game tokens different than using Meta credits?

  • January 12, 2026
  • 8 replies
  • 289 views

Hello

I set up the shop gizmo in my world so players can buy perk upgrades (auto-consumed items). My problem is that when I change the price from Meta credits to in-game tokens, it suddenly stops working correctly. I wanted to know if the event triggered is different when buying items with tokens versus Meta credits.

Thank you for you help

Best answer by SeeingBlue

Then it might be this special networkevent.

https://developers.meta.com/horizon-worlds/reference/2.0.0/core_inworldshophelpers

 

8 replies

SeeingBlue
Honored Contributor
January 13, 2026

You're talking about this right?

What does the Item settings in the property panel to the right look like for this item?

Upcoming Events : Performance Pro - UI Unleashed - Building Responsive & Performant Interfaces Thursday June 19th 5:00 PM PT - Register June Programming Calendar
TiitouaanAuthor
Inspiring
January 13, 2026

Yes that's what I'm talking about. Here is my property panel.

Flouz are the in-game tokens; the first item can be purchased with meta credits, but the second and third cannot.

 

SeeingBlue
Honored Contributor
January 13, 2026

Okay, looks correct. I would expect this to work. What are you seeing instead? Player tries to purchase and nothing happens? What event are you listening for?

Upcoming Events : Performance Pro - UI Unleashed - Building Responsive & Performant Interfaces Thursday June 19th 5:00 PM PT - Register June Programming Calendar
TiitouaanAuthor
Inspiring
January 13, 2026

Here my script attached to the shop guizmo :

class ShopScript extends hz.Component<typeof ShopScript> {
  static propsDefinition = {};

  start() {

    this.connectCodeBlockEvent(this.entity, CodeBlockEvents.OnItemConsumeComplete, (player, item, success) => {
      if (success) {
      console.log(`${player.name.get()} successfully consumed the item: ${item}`);
      if(item === "+1_knockback_multiplier_2dfd2123")
      {
        // Ajouter +1 knockback multiplier
        const knockbackMultiplier = this.world.persistentStorage.getPlayerVariable(player, PersistentVariables_Data.playerPersistentVariables.number.knockbackMultiplier);
        this.world.persistentStorage.setPlayerVariable(player, PersistentVariables_Data.playerPersistentVariables.number.knockbackMultiplier, knockbackMultiplier + 1);
        console.log(`Increased knockback multiplier for ${player.name.get()} to ${knockbackMultiplier + 1}`);
      }else if(item === "+1_recoil_multiplier_0ec76b29")
      {
        // Ajouter +1 recoil multiplier
        const recoilMultiplier = this.world.persistentStorage.getPlayerVariable(player, PersistentVariables_Data.playerPersistentVariables.number.recoilMultiplier);
        this.world.persistentStorage.setPlayerVariable(player, PersistentVariables_Data.playerPersistentVariables.number.recoilMultiplier, recoilMultiplier + 1);
        console.log(`Increased recoil multiplier for ${player.name.get()} to ${recoilMultiplier + 1}`);
      }else if(item === "+1_resistance_multiplier_6517be99"){
        // Ajouter +1 resistance multiplier
        const resistanceMultiplier = this.world.persistentStorage.getPlayerVariable(player, PersistentVariables_Data.playerPersistentVariables.number.resistanceMultiplier);
        this.world.persistentStorage.setPlayerVariable(player, PersistentVariables_Data.playerPersistentVariables.number.resistanceMultiplier, resistanceMultiplier + 1);
        console.log(`Increased resistance multiplier for ${player.name.get()} to ${resistanceMultiplier + 1}`);
      }  
    }
    });
  }

}

All items are set to auto-consume. It seems to work fine when purchasing with meta-credits, as the console output and PPV are updated. However, when purchasing with Flouz, there is no console output and the PPV does not update.

SeeingBlue
Honored Contributor
January 13, 2026

You might try listening to the code block onConsumptionStarted, if it fires then use the consumeItemForPlayer(player, sku, quantity)

Upcoming Events : Performance Pro - UI Unleashed - Building Responsive & Performant Interfaces Thursday June 19th 5:00 PM PT - Register June Programming Calendar
TiitouaanAuthor
Inspiring
January 13, 2026

I assume you meant onItemConsumeStart, unfortunately the OnItemConsumeStart Event doesn't fire when I purchase an item with in-game tokens... Neither the OnItemConsumeStart, the OnItemPurchaseStart nor the OnItemPurchaseComplete events fires, wether I purchase item with meta-credits or Flouz

SeeingBlue
Honored Contributor
January 15, 2026
Upcoming Events : Performance Pro - UI Unleashed - Building Responsive & Performant Interfaces Thursday June 19th 5:00 PM PT - Register June Programming Calendar
TiitouaanAuthor
Inspiring
January 16, 2026

It is! Thank you for your help :)