Gui breaking verb right-click inventory

Started by Nixxon, Thu 15/05/2014 04:48:36

Previous topic - Next topic

Nixxon

Hey guys,

This a weird one... some clickable GUIs seem to be breaking the right click verb inventory function.

eg. I have a Gui that shows up in a certain room, which when click on... moves the player to a different room -

function gExitoutside_OnClic(GUI *theGui, MouseButton button)
{
player.ChangeRoom(1, 303, 153);
}

Works great. However, after doing this in game, the right click inventory function no longer works in my game.

I have a near exact gui button in another room and this doesn't seem to effect the inventory at all.

As follows -

function gExit2_OnClic(GUI *theGui, MouseButton button)
{
player.ChangeRoom(2, 150, 170);
}

The above function doesnt kill the right click inventory at all. Perplexed!


UPDATE: Doesn't seem to be clicking the ui's that's doing it. It's entering the rooms with the additional UI.


function room_Load()
{
gExitoutside.Visible = true;
}

function room_Leave()
{
gExitoutside.Visible = false;
}


Why would above effect the inventory?

Nixxon

Update 2: I removed the above code, and it's still broken.

Going into some rooms just disables the inventory right click function. Crazy.

Ghost

This is a wild shot, but is your additional GUI OVER the inventory window? Then it will "catch" the mouse clicks and the result will be "inventory clicks not working".

I'm asking because your code looks nothing out of the ordinary and shouldn't break anything, and I HAVE seen GUI overlays causing the exact problem.

Nixxon

I actually disabled every GUI in the room, completely removed the code. Something about room 6 and room 3, whenever i enter these rooms the right click function is disabled. (i can still open the inventory GUI with a button).

Ghost

Odd, really. Which AGS version are you using? Can you upload the project Folder, maybe, so that we can have a look at the code (or post the full room code)? I am pretty sure that it's just some off line of code somewhere but if you are on the latest AGS Version you may have found a bug.

Khris

If you don't want to upload your sources, could you

a) show us your eMouseRightInv block from on_mouse_click
b) check those rooms for on_mouse_click functions that might claim the event?

SMF spam blocked by CleanTalk