Hi GiL,

I'm playing around with having world-space shop items instead of a shop menu.

Currently I've got a schematic for each item I could buy, with a choice dialogue "Do you want to buy" -> Check player inventory has enough money -> subtract money -> add item to inventory -> destroy prefab.

This is all hardcoded in the schematic. Meaning any price changes or name changes need to get edited back in.

Is it possible to get all the StartingObject (I'm assuming starting object and not Machine Object - the interact machine is on the item I want to buy, the the player interacts with it to initiate schematic) values somehow? Price, name, object type etc.
  • The machine object is the object the machine component is on, so that'd be the item - the starting object is the player (for interactions started by the player).

    How's your overall setup for those item game objects?
    E.g. are they just game objects with an interaction or do they have some setup to link an item to them, e.g. an Item Collector?
    Please consider rating/reviewing my products on the Asset Store (hopefully positively), as that helps tremendously with getting found.
    If you're enjoying my products, updates and support, please consider supporting me on patreon.com!
  • They're just game objects with interaction. I tried using item collectors, using a schematic at Before Collection but I couldn't cancel out of the collection - even if I cancelled the "Would you like to buy this" it still added the item to the inventory.
  • Set up the item collector to use no start type (None button). That way you can use an interaction machine on the item collector and start it via the schematic (Start Item Collector node), e.g. only after doing some additional dialogue.
    You can get the item from the item collector using a Select Item Collector node - e.g. afterwards using a Store Selected Data Content node allows you to store the name (or other information) of the item into a string variable and display it in a dialogue.
    Please consider rating/reviewing my products on the Asset Store (hopefully positively), as that helps tremendously with getting found.
    If you're enjoying my products, updates and support, please consider supporting me on patreon.com!
Sign In or Register to comment.