Forum rules - please read before posting.

Casher

Hello, I would like to create a game. In one of the scenes, the player will be a cashier inside a restaurant. the npc comes from the outside in front of the player and asks for food. the player serves the food.
Can I do this in Adventure Creator?
(Restaurant scene has been created, I just need to do the above functions)

Comments

  • The various food items can be Hotspots around the Player, clicking them adds them as items to their Inventory, and then those items can be given with to the NPC via a Hotspot interaction.

    Fundamentally, it's the same mechanics as picking up a key and unlocking a door with it. For a demonstration on this, see the "Key and lock" example scene in the :Puzzle Template: Simple Examples" package, available on the Downloads page.

    Things can get more complex, but it depends on your game's design. Are their multiple NPCs? Do they randomly choose food items to ask for? I can advise further, but I'd need to know more about the specifics of your intended mechanics.

  • Hi Chris, first i want to thank you for this nice tool It's true that I haven't bought it yet, but I plan to do i just want to make sure it meets the functionality of my game.

    Anyway i do not think that the inventory way will work because I want the player to carry the plate of food and give it to the NPC, according to what I saw in the tutorial, the inventory way just clicks on the item and it disappears, but no, I want the item to be carried in the player’s hand until he gives it to the NPC.

  • edited September 2023

    The Character: Hold object can be used to place an item in the Player's hand - this can be both an item in the scene, or a prefab linked to an Inventory item that gets spawned in at runtime.

    The 3D Demo uses this technique when the Player uses the Sword with various Hotspots. You can find it at the back of the room (behind Brain) - if you then try talking to Brain about it, or using it on the Canvas, you'll see it in action.

    A tutorial on syncing Inventory items with a 3D object in the scene can be found here.

    To prevent the Player from being able to pick up more than one plate at once, you could create an associated Item for each plate, which gets added to the Player's inventory when held. Before doing so, however, you could use the Inventory: Check Action to work out if they're carrying something. If they are, don't do anything - otherwise, pick up the plate.

    Again, the exact logic involved would be down to the specifics of your needs, so if you can elaborate on your situation I can give more specific advice. Fundamentally, though, the act of having an object be placed visually in the Player's hands is possible, yes.

Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Welcome to the official forum for Adventure Creator.