inventory interaction while player moving not working

Started by Abada, Sun 10/02/2008 20:52:24

Previous topic - Next topic

Abada

Hi

I am currently trying to implement a lucasart style interface. For the movement part I have been using the MI2 template 2.71 by Proskrito.

So far I have managed to get the character interacting with the hotspot/object after they have moved to the object. I can also intercept the movement and walk somewhere else or interact with another hotspot/object.

The problem is when I try to interact with an inventory item or a verb button. It simply refuses to accept any inventory/verb clicks, instead it simply turns the mouse cursor back to walk mode.

I have searched the forum and tried several things with no success, such as trying to get the inventory item into the active inventory then running the mouse interaction on it.

Here is the important part of the code I am using. I use the MoveP function in the room code.

Can anyone think of away around this or will I need to change the code to something completely different? I was wondering if it is because I do not have anykind of left or right mouse inv click code in there? I can not have (mouse.IsButtonDown(eMouseLeftInv)) but maybe there is somthing I can do like this that I have missed ?

Code: ags

function Move(int x,  int y,  int direction)
{
player.Walk(x, y, eNoBlock);

while (player.Moving && ((mouse.IsButtonDown(eMouseLeft)) || (mouse.IsButtonDown(eMouseRight)))) 
  {    
  Wait(1);
  mouse.Update();  
  }

while (player.Moving)
  {     
   if         (mouse.IsButtonDown(eMouseLeft))
              {
              return 0;
              }      
    else if (mouse.IsButtonDown(eMouseRight))
              {
              return 0;             
              }
    else 
              {
              Wait(1);
              mouse.Update();
              }
  }
  return 1; 
}

Code: ags

function MoveP(int x,  int y)
{
  return Move(x, y, 0);
}


So far the player has to double click to do an inventory interaction. this is not that bad I guess but it is not what I want.

SMF spam blocked by CleanTalk