Inventar nach Tutorial von glenfx scheint nicht zu funktionieren.

  • #10, by Marian77Tuesday, 13. May 2014, 14:32 10 years ago
    Ok, here the english version:
    I am one step further now. I can now open the inventory by clicking on my closed-bag-icon. The open inventory had an open-bag-icon that was first overlaid by the closed-bag-icon, so i had to add an other action to the secondary interface that opens the inventory: hide the secondary inventory. But it works nice now. I have also an action that hides the inventory on leaving the area and I had to add an other action that shows the secondary interface on leaving the inventory area. So basically I just did what glenfx did in his tutorial, I just had to add the manual hide and show for the secondary inventory. As it seems, the previous version did this automatically.
    I also had to change the icon/picture for the open inventory. My button for the secondary interface was 250x200 (closed bag), the open inventory was the same size, the items were supposed to be shown in a row beside it in placeholders. But the inventory disappeared when the cursor left the 250x200 area. So now the Background picture is basically the same, but its width is 1920, with the open bag on the left side and the huge transparent area to the right. I'll probably make a video of how it works tonight.

    Forum Fan

    231 Posts


  • #11, by Marian77Tuesday, 13. May 2014, 20:43 10 years ago
    Ok,
    I got my inventory working! I can take the Hammer and it appears in my inventory! Just two problems remain:
    1.) Since I have my backgrounds kind of "inverted", I have to place empty spaces where I take items. To be more precise: My basic background images already do contain all the items that can be taken away. So if I take something, I have to place a small picture with the Item already missing on the right place of the background. For example, I have an emergency Hammer in my arrest cell and I created an object called emergency_hammer_gone showing the holder with the hammer missing. I defined the outlines of the hammer on this object and placed it on the right spot on the wall. When I run the game and the condition of the object is true, I see the hammer missing, but since this object contains the outline, I can select it and pick it up, the hammer appears in my inventory. Would be perfect if I had used the standard way. But like this it makes no sense, because I can't see the hammer and pick it up anyway. If I set the condition to false, then the game starts correctly, showing the hammer on the wall (empty space is hidden), but like this I can not select the hammer or pick it up. Can I do anything about it or is it easier to just redo the backgrounds with all objects that can be taken away missing?

    Forum Fan

    231 Posts

  • #12, by Marian77Tuesday, 13. May 2014, 22:48 10 years ago
    I think I solved it . . . somehow. I guess in little steps I start to understand how VS works. Now my scene looks like this: I created an Object called hammer and it only contains an outline of the hammer that is shown in the background image, plus the condition true. When I leftklick it, I put the Item Hammer into my inventory plus I set the condition of the object hammer to false. Now I can no longer select it. I created a second object that is called hammer_holder, this object has no outlines (or active area or whatever you call it), but contains the the picture of the empty hammer holder and has the condition false. When I leftclick the hammer object, I also set the condition of hammer_holder to true, which makes it visible. I guess like this it's a little bit awkward, but the result seems to be working. Is there anything that speaks against this method? It a little bit more work and requires one more object, but as far as I see now, this should not lead to any major problems. Right?

    Forum Fan

    231 Posts