Forum rules - please read before posting.

Selected inventory item questions

edited May 2014 in Technical Q&A

I tried the "Disable with left-click" setting and I'm not sure what I'm getting. It doesn't really matter
if I check or uncheck this setting, whenever I left-click on the scene (on no particular hotspot) sometimes the inventory item gets de-selected and sometimes it doesn't - and in both cases, the player starts walking to the clicked position.

And speaking of de-selecting the inventory item, why is the item de-selected whenever I click on a hotspot that doesn't support the specific item? How can I prevent this from happening?


Comments

  • See my previous post about this- http://www.adventurecreator.org/forum/discussion/193/1-31-bugs

    Looks like Chris is trying to get this fixed for 1.32.
  • Thanks! You meant my first point, right?
  • Yes, the first part. In reference to the second part, there is an unhandled interaction slot where you can run an inv action list when the inventory item is clicked on an unsupported hotspot. I presume this is the way around your issue.

    If you are using single interaction mode for inventory interactions (in settings) you can also separate unhandled interactions for each inventory item, though apparently you can't do that with multiple interactions.
  • Thanks Skitt!

    Well, all I want is for the game to do nothing at all if an inventory item is clicked on a hotspot which doesn't support it. I want neither the item to be de-selected nor any other response from the game. Is that possible at the moment?

  • I don't believe so... I guess we'll have to see what Chris has to say.
  • First things first.  Several inventory-related bugs have been quashed for 1.32.  Let me get that out first, then we'll see what remains.
  • Fair enough.
  • It's been a long time but I finally got around to testing this again. Mind you I'm still using version 1.37a (though nothing in the release notes of version 1.38 indicates any changes in this regard).

    Anyway, here is what I see at the moment:

    1. Left-clicking with the selected inventory item cursor on the scene on no particular hotspot, sends the player walking towards the clicked position. This wasn't the action I expected, I simply expected the game to do nothing at all. I mean, clicking somewhere on the scene with a credit card, for instance, doesn't mean I want to walk to that point. Using the "Disable with left-click" option in the Settings tab doesn't provide the desired action either as it deselects the inventory item as well as sends the player walking towards the clicked position.

    2. Left-clicking with the selected inventory item cursor on a hotspot, which doesn't support the selected item, deselects the selected inventory item. Here too this wasn't the action I expected, I simply expected the game to do nothing at all here as well. I mean, a common practice among many players is to grab an inventory item and try it on each and every hotspot in the scene. At the moment, the player will have to re-grab the item after each and every time he uses it, which can be very frustrating. I believe deselecting an inventory item should not occur by any kind of left-clicking at all unless clicked on a hotspot with a specific interaction defined for that item.

    3. Right-clicking with the selected inventory item cursor on a hotspot doesn't deselect the selected item. As I have "Right-click active item" set to "Deselects Item", the action I expected is the same as with any other right-click while holding an inventory item, and that is deselect the selected item.

    4. Double-clicking with the selected inventory item cursor on a hotspot that supports the specific item doesn't cause the player to run to the assigned marker and perform the assigned Inventory interaction (as it does with the Examine and Use interactions). Instead, the first click of the double-click starts the player walking towards the assigned marker and the second click causes the player to perform the Use interaction.

    Hopefully I managed to clearly explain each of the above points but I'll be happy to elaborate if I didn't.

  • A matter of opinion, perhaps.  My thinking in e.g. 1) was that players would rather be able to move across a multi-screen scene if they can't see the Hotspot they wish to use once they've selected the items.

    Much of these can be made into simple options within the Settings Manager, but it does feel like it's going to get rather complicated..
  • Believe me, I know exactly what you mean about things getting complicated. Having to check a large amount of Booleans with every single interface operation is never pretty, but what other option is there when dealing with a generic tool? Developers have different opinions regarding game mechanics and no one wants to settle for anything but his own view... :(
  • Hi,

    I upgraded to 1.39 today and wanted to say that I really appreciate the work that has been done here!

    I also tested the issues I described above and here are the results:

    Issue #1 is solved now with the new "Can move player if an Item is active".

    Issue #2 is only partially solved now. The selected item is not deselected anymore when left-clicking on a hotspot which doesn't support it, which is good, but the cursor and hotspot label disappear for a brief moment and then reappear with each left-click on such a hotspot. More so, the selected item is still being deselected when left-clicking on another inventory item.

    Issue #3 is not solved yet. Right-clicking with the selected item on a hotspot after setting "Right-click active item" to "Deselects Item" doesn't deselect the item.

    Issue #4 is solved now.

    Thanks!

  • Issue #3 is
    not solved yet. Right-clicking with the selected item on a hotspot
    after setting "Right-click active item" to "Deselects Item" doesn't
    deselect the item
    Works just fine for me.  Try it in the 3D demo game - right-clicking the sword on Hotspots de-selects it.  That may help to work out the difference.
  • It does work in the 3D demo. If you point me to the right place in the code, I can debug this and try to find out why it's not deselected in my case.
  • PlayerInteraction.cs, line 99.
  • I found some time today to take a look at this and found the following:

    Line 99 was never called in my case because the "if" statement in line 90 was always false. The reason it was false was because my settingsManager.inventoryInteractions was set to InventoryInteractions.Multiple, even though my settingsManager.interactionMethod is set to AC_InteractionMethod.ContextSensitive . Although this in itself looks like a bug, I looked a bit further in the code to see how to change this. So I switched out of ContextSensitive mode in the Settings Manager and in the "Inventory interactions" popup that I could then see, I selected Single and then switched back to ContextSensitive mode. It did work and my inventory item now properly deselects but a new issue has arisen. Now the inventory item is being deselected, all right, but the my Examine interaction is being executed as well upon right-click (line 129) and this should not have happened.

    Does all this help you somehow in pinpointing the problem or should I dig some more?

  • Good spot - the final "||" in that line should have been "&&", thanks.  New issue fixed for 1.40.
  • Don't you mean the other way around? Right now it is "&&" and it would seem reasonable that it should be "||". Otherwise the parentheses have no meaning.

    And what about line 129?

  • Yes, you're right - got confused.

    I was referring to line 129 when I said "New issue fixed".
  • Great, thanks! :)
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.