Author Topic: Use_Inventory mouse-mode Item cursor problem (on standard template)  (Read 228 times)

Hi guys' I'm new to the forum and I'm developing my first game.
I would like to change the behaviour of the Use inventory item cursor (I'm using AGS 3.4.0 with the standard template, where the mouse-mode change right-clicking).

Explaination:
When you don't have an object active in the inventory you don't see the use_inventory cursor when you right-click.
When you use an inventory item to do some action (e.g. The player use a screwdriver on a screw) the game activate the object cursor of mouse-mode "Use inventory" and you can click with this on hotspot/objects/etc to interact.
After using the object you can be in two situations:

1-You lose the object--->the game deactivate the "Use inventory" mouse mode and hide the cursor so when you right click it's not available.
2-You do NOT lose the object--> the "Use inventory" mouse mode is still active when you right click and the cursor mantain the shape of the object. 

Request: Is it possible to force the game on ALWAYS deactivate the "Use inventory" mouse mode after using an object? (like the situation 1)

Maybe it's a silly question but I didn't find answers on old topics :(
Thank you in advance!

Khris

    • Lifetime Achievement Award Winner
    •  
    • I can help with play testing
    •  
    • I can help with scripting
    •  
    • I can help with translating
    •  
    • Khris worked on a game that was nominated for an AGS Award!
Sure, just call
Code: Adventure Game Studio
  1.   player.ActiveInventory = null;
This should automatically move on the cursor mode to eModeWalkto as well.

Sure, just call
Code: Adventure Game Studio
  1.   player.ActiveInventory = null;
This should automatically move on the cursor mode to eModeWalkto as well.

Thank you, I will try ASAP!

If I understood well, I have to put this line after all "use inventory" events

Khris

    • Lifetime Achievement Award Winner
    •  
    • I can help with play testing
    •  
    • I can help with scripting
    •  
    • I can help with translating
    •  
    • Khris worked on a game that was nominated for an AGS Award!
I hope you aren't planning on deselecting the item regardless of whether the attempted action was fruitful?

I hope you aren't planning on deselecting the item regardless of whether the attempted action was fruitful?

No, only after a successful action that do not cause LoseInventory of the object :grin:
I will create a "deselect" button on the icon bar for other situations :smiley: