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$
  • $\begingroup$ This site is not the place to ask for tutorials blenderartists.org/forum/… $\endgroup$ – Duarte Farrajota Ramos Mar 14 '17 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$ – Miracles Happen Mar 14 '17 at 3:09
  • $\begingroup$ See this meta.blender.stackexchange.com/questions/62/… $\endgroup$ – Duarte Farrajota Ramos Mar 14 '17 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$ – Duarte Farrajota Ramos Mar 14 '17 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$ – Miracles Happen Mar 14 '17 at 10:54
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$
  • $\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$ – Miracles Happen Mar 27 '17 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 Mar 28 '17 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$ – Miracles Happen Mar 29 '17 at 14:00

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.