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 - Creedy

#1
Just solved it....well, partially.

The reason was this:

Code: ags

function on_mouse_click(MouseButton button) {
  // called when a mouse button is clicked. button is either LEFT or RIGHT
  if (IsGamePaused() == 1) {
    // Game is paused, so do nothing (ie. don't allow mouse click)
  }
  else if (button == eMouseLeft) {
    ProcessClick(mouse.x, mouse.y, mouse.Mode );
    mouse.Mode = eModeWalkto;
  }
  else if (button == eMouseRight || button == eMouseWheelSouth){
    // right-click our mouse-wheel down, so cycle cursor
    // mouse.SelectNextMode();
  }
}


The mousemode gets set back to eModeWalkto (ID 0), before the Any_Click function is called.
#2
In fact, I tried some debugging lines before.
The strange thing is a different behaviour for Inventory items, Hotspots and characters. The functions are called, because I receive feedback, but wrong ones.

Code: ags

function cAmy_AnyClick()
{
  Display("%d", mouse.Mode); // Delivers: "0" which is not correct
}

function iVCard_OtherClick()
{
  Display("%d", mouse.Mode); // Delivers: "8" which IS correct
}

function hCorner_AnyClick()
{
  Display("%d", mouse.Mode); // Delivers: "0" which is not correct
}


The custom cursors start with IDs "8", "9", "10" etc. and I switch them over a custom GUI with the ClickAction property set to "SetCursorMode" and NewModeNumer set to "8".

I'm really confused about this  ???
#3
Hi guys,

I've got a problem with the mouse.Mode property. I have several custom mousemodes (eModeThink, eModeMental etc.).

When using them with inventory items over the "OtherClick()" function, I have no problems at all:

Code: ags

function iApple_OtherClick()
{
  
  if (mouse.Mode == eModeThink) {
    player.Say("Hm, I think it's an apple.");
  }
  else if (mouse.Mode == eModeMental) {
    player.Say("Doesn't work at all.");  
  } 
}


But when using the same code with characters and hotspot and "AnyClick()", nothing happens:

Code: ags

function cAmy_AnyClick()
{
  if (mouse.Mode == eModeThink) {
    player.Say("It works"); //DOESN'T WORK!
  }  
}


I tried to replace eModeThink with the Mode-ID (10 in this case), but it doesn't work either.

They are all new custom mousemodes, starting with ID 8 (so I haven't overwrite the standard mousemodes look, interact etc.)


Can you help me out? Reasons? Workarounds? Solutions?

Thanks very much!
SMF spam blocked by CleanTalk