Adventure Game Studio

AGS Support => Beginners' Technical Questions => Topic started by: steptoe on Sat 21/04/2012 07:02:13

Title: Mouse back to Interact after using inventory item
Post by: steptoe on Sat 21/04/2012 07:02:13
Hi

Once an inventory item has been USED on something the mouse changes back to walk mode. How do I get it to go back to Interact mode?

Normal Interact, say with Hotspots, are ok... It's just if player has used inventory.
cheers

I am having to use this after inv used, which I am sure may not be the correct way:


mouse.Mode = eModeInteract;



Title: Re: Mouse back to Interact after using inventory item
Post by: Khris on Sat 21/04/2012 10:20:01
When you say after having used it, do you actually mean after the player loses the inv item?
If yes:

function on_event (EventType event, int data) {

  if (event == eEventLoseInventory) mouse.Mode = eModeInteract;

}
Title: Re: Mouse back to Interact after using inventory item
Post by: steptoe on Sat 21/04/2012 11:45:09
Hi Khris

Once I have used and lose ActiveInventory the cursor does not go back to Interact.

I am having to use this after inv used:


player.ActiveInventory=null;
mouse.Mode = eModeInteract;


I shall look at putting your function in.

cheers

steptoe