Menu

Show posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.

Show posts Menu

Messages - Helixeagle

#1
Well I clearly have a lot to learn, thank you so much! this worked perfectly, maybe I can actually advance my game now :)
#2
Most of what I currently have is by trial and error, I'm new to AGS and stubbornly have started from scratch learning along the way. I have looked over the internet and forums over the week and have finally decided to post as I have found bits and pieces of what I need/want but am failing to understand how I am going to work around specific issues I am discovering along the way.

What I essentially want is a method of left clicking for eModeInteract + eModeWalkto and right click as eModeLookat, which I have done simple enough by editing the on_mouse_click and Process Click coding, I have also recently created a custom Inv GUI which is always available (not sure if this ties into my issues) on screen and used a player.ActiveInventory = inventory[game.inv_activated] command to help me select inventory items with my new mouse (if that makes sense) so a bit like Brokensword or The Dig.

But say I wanted to do the following on a door hotspot:

function door_UseInv()
{
  if (player.ActiveInventory == IKey) {
  cChar.Say ("Hello!");
  }
else
{
  cChar.Say ("Goodbye!");
}



This will work fine but because interact, useinv, talk etc are all mashed into left click, it executes the actions one after another (which I guess is pretty obvious), so it will run the hotspot interact script and then the use inv script etc etc, the issue is that I stubbornly refuse to accept defeat on my single cursor idea, my coding is pretty messy since I'm using trial and error most of the time.

Is there a way to possible avert the interact and walkto clicks when I have an active inventory item? I'm not entirely sure on what's possible, I've tried a couple of things to no avail, I may have to ditch the idea completely since it's starting to drive me mad, here's the mess of code regardless:

function on_mouse_click(MouseButton button)
{
  if (IsGamePaused() == 1)
{
}
  else if (button == eMouseLeft)
  {
    ProcessClick(mouse.x,mouse.y, eModeInteract);
    ProcessClick(mouse.x,mouse.y, eModeWalkto);
    ProcessClick(mouse.x,mouse.y, eModeUseinv);
  }
      else if (button == eMouseRight)// right-click, so Lookat
  {   
    ProcessClick(mouse.x,mouse.y, eModeLookat);
    mouse.Mode = eModeWalkto; 
  }
 
if (button == eMouseLeftInv)
  {
   player.ActiveInventory = inventory[game.inv_activated];
  }
  else if (button == eMouseRightInv)
  {
    inventory[game.inv_activated].RunInteraction(eModeLookat);
  }
 
 
 
 
   
SMF spam blocked by CleanTalk