Adventure Game Studio

AGS Support => Beginners' Technical Questions => Topic started by: Swamp Witch on Mon 10/10/2005 01:37:52

Title: Inventory over hotspot problem
Post by: Swamp Witch on Mon 10/10/2005 01:37:52
In my global script, I am using this:

function repeatedly_execute() {
Ã,  // put anything you want to happen every game cycle here
Ã,  if (GetLocationType(mouse.x,mouse.y) > 0) {
Ã,  Ã,  Ã, mouse.UseModeGraphic(eModePointer); }
Ã,  else {
Ã,  Ã,  Ã, Mouse.UseDefaultGraphic(); }

so that whenever the mouse rolls over a hotspot it will turn to the pointer.Ã,  The problem is, whenever the cursor is holding an inventory item and rolling over the hotspot, the inventory item disappears and the cursor turns into the pointer.Ã,  Moving away from the hotspot will display the inventory item again.Ã,  How can I code it so this will not happen?Ã,  This is a first person game and the only cursor modes I am using is "interact".
Title: Re: Inventory over hotspot problem
Post by: Gilbert on Mon 10/10/2005 02:12:32
I think you may try:
function repeatedly_execute() {
  // put anything you want to happen every game cycle here
  if (GetLocationType(mouse.x,mouse.y) > 0) {
     if (Mouse.Mode!=eModeUseinv) mouse.UseModeGraphic(eModePointer); }
  else {
     Mouse.UseDefaultGraphic(); }
Title: Re: Inventory over hotspot problem
Post by: Swamp Witch on Mon 10/10/2005 03:34:41
Yes that worked.  Thank you!!!!!