I'm having a problem where the shop works the first time I start the game through the main menu. When the player approaches the shop keeper and presses the interact button, the shop UI appears and the player can buy and sell items. But after the player completes a battle, interacting with the shopkeeper no longer brings up the shop UI.

The shop in ORK Framework is setup exactly like this tutorial: http://orkframework.com/tutorial/game-tutorial/41-adding-a-shop/

The shop in the scene is setup like so: https://imgur.com/a/YwBrX1L

The battle start event: https://imgur.com/a/WSqkB7n

And the battle end event: https://imgur.com/a/STizXzi

I've tried a lot of things, but I couldn't figure out what the problem is.

  • Since you're using Key Press instead of Interact as the start type, make sure the player is in the shop's trigger and (the player) also has a collider and rigidbody attached. Might be that that's somehow get removed or disabled during battle?
    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!
  • I always make sure that the player is inside the shop trigger. I also checked, and the player has a collider and a rigidbody, both of which was never removed or disabled.
  • Hm, the only other think I could think of would be the game state not allowing opening the shop. Are you able to start other interactions?

    You can check the game states via the _ORK game object in your scene (in the DontDestroyOnLoad objects in the scene hierarchy). Can Interact should be true, the rest false.
    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!
  • "Can Interact" is true, and everything else is false.
    https://imgur.com/a/GyosSeA

    I can interact with other NPCs. Only the shop no longer works.
  • Huh ... strange. Are you able to open the shop if you do it via the regular Interact start type?
    This sould definitely work - opening the shop isn't really rocket science, if the interaction can start and the shop isn't already opened (from that component) it'll open.
    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!
  • I just had this happen to me, I solved it by redoing the Shop Layout. I have no idea why I had to, but I made a new one, went back to the tutorial and just popped in the settings again, and changed the Shop to call the new layout. After that I tested again and the shop worked again.
  • I just had this happen to me, I solved it by redoing the Shop Layout.
    Unfortunately, this didn't work.

    If I try to open the shop with regular Interact type, the shop works fine for some reason, it's only if I use the Key Press type.
  • What's the setup of that input key - and do you at any point block the input key (via a Block Input Key node)?
    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!
  • edited February 2021
    https://imgur.com/a/oG1qFlw
    This is how the input key is setup

    As for blocking the input key, I'm pretty sure it's never blocked, but I'll double check.

    Edit: I checked, and the input key is never blocked.
    Post edited by Void on
  • Hm, looks correct, though there's not much you can do wrong here :)

    I guess this only leaves one possible reason why it's not working - the player isn't recognized as being in trigger. Try enabling Start By Collider as well, with your current setup it'd only recognize triggers that enter the shop's trigger.
    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!
  • It looks like the input key was somehow blocked somewhere at some point. I couldn't pinpoint exactly what blocked it, but I made a new input key to interact with the shop, and it works correctly now. Thanks for the help.
Sign In or Register to comment.