0
$\begingroup$

I want to make an inventory for an adventure game. The game is first person and the items to be collected will be used later in other parts of the game. To give you an idea, the game is something like an HOPA (Hidden Object Puzzle Adventure) game, here is an example:

example hidden object game example

I have already watched tutorials available on YouTube but they don't seem appropriate. The game is a point and click so no keyboard will be used.

$\endgroup$
9
  • $\begingroup$ This site is not the place to ask for tutorials blenderartists.org/forum/… $\endgroup$ Commented Mar 14, 2017 at 3:03
  • $\begingroup$ I have already had a look at that tutorial but as I said, it's not a shooter it's a point and click adventure game with no keyboard involved! $\endgroup$ Commented Mar 14, 2017 at 3:09
  • $\begingroup$ See this meta.blender.stackexchange.com/questions/62/… $\endgroup$ Commented Mar 14, 2017 at 4:18
  • 2
    $\begingroup$ Also correct me if I'm wrong, but an inventory is an inventory, shooter game or otherwise. It is supposed to contain/organize/display in-game items, the underlying concept should be the same, regardless of how you control it, point being there must be something useful about that tutorial. $\endgroup$ Commented Mar 14, 2017 at 4:55
  • $\begingroup$ Sure! The difference is that when you have an inventory for weapons, you call the inventory by clicking a keyboard key, you can even do that without using any script just with logic bricks. You can also switch weapons by assigning a key to each but in the point and click case, you have to do everything only with the mouse and I have just started using game logic so I was hoping that someone else had done that. I believe that a python script would help the most. Otherwise, I will have to go through all the tutorials available on the subject and work something out by myself. Thanks anyway! $\endgroup$ Commented Mar 14, 2017 at 10:54

1 Answer 1

1
$\begingroup$

Okay, what you are asking is quite a big task and you first need to make a saving function so that items are saved for later on and don't just disappear. That needs python, and luckily this exists: https://www.youtube.com/watch?v=ffws4ijjk-0

Then you need to make a second scene that has the HUD, which is basically just an image of some boxes where items would go. Then you would add an empty in each slot, and then set it up so that when you pick up an item (or interact with an item) the empty would add the object into the HUD slot where the empty is located. And then you would make a property for each item you can possibly get, so that when you have the item it can add 1 to the property. When you use the item, it would take away the 1 from the property and get rid of it from the HUD, by ending the object that represents the item. Finally, you need to add a property that keeps track of how many items you have. For example, if the HUD could hold 6 items, then you need to set it up so when you try to pick up a 7th item, it would not let you because the value is 6 already. Once this value is decreased to 5 or less, then it would let you pick it up.

This is mostly just my ideas and I have't actually ever done this, but I strongly believe it would work. It might be a bit tricky setting up which empty adds the HUD object though.

$\endgroup$
3
  • $\begingroup$ Yes, that's exactly what I have in mind. As far as I understand, using python in combination with the logic bricks is the best way to do it. I think the HUD should be done in an overlay scene. I love ThaTimst3r's tutorials, they are very clear and I'll definitely check the tutorial you suggested. I know how to store variables and now I'm learning how to save objects and manipulate their behavior in python. There is so much to learn but everything is really interesting. Thank you for your help! $\endgroup$ Commented Mar 27, 2017 at 11:10
  • $\begingroup$ You are welcome, and yes I did mean make the HUD as an overlay. I probably just poorly explained it $\endgroup$
    – user37321
    Commented Mar 28, 2017 at 23:50
  • $\begingroup$ You explained it very well, it's me that I still haven't learned all the technical stuff... Feel free to contact me again if you come across any other useful tips related to this matter. Thanks again! $\endgroup$ Commented Mar 29, 2017 at 14:00

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .