How to do that the inventory is opened touching the right button of the mouse?.

Started by Mariano Cirigliano, Wed 27/10/2010 19:34:36

Previous topic - Next topic

Matti

Wow, you dig up an ancient thread, start two new ones and now you're randomly sending PMs around so that people will deal with your issue? Jeeez.

Calm down, dude. If you post here, people will read it and help you if they can. Do you want us to make your game for you?

Chim

function on_mouse_click(MouseButton button) {

if (button == eMouseRight)
   show_inventory_window();
}

np

Lt. Smash

so before you open up another topic ;D here is a simple way:

Just go into the on_mouse_click event function of the globalscript and just check for the right mouse button:

Code: ags
[else] if (button == eMouseRight) {  
  gMyGuisName.Visible = true; 
}

Mariano Cirigliano

Quote from: Lt. Smash on Wed 27/10/2010 20:17:07
so before you open up another topic ;D here is a simple way:

Just go into the on_mouse_click event function of the globalscript and just check for the right mouse button:

Code: ags
[else] if (button == eMouseRight) {  
  gMyGuisName.Visible = true; 
}


This can I write it in the game that comes for Defult?. Because not in that part to write it. Thank you.

mode7


Khris

What you're asking is really really basic stuff; explaining that while struggling with the language border is not going to be fun at all.
Try to get someone who speaks English and Spanish to help you, otherwise this is going to become a huge mess.

Edit: mode7, that's not going to help. LtSmash's code is a small snippet that's supposed to go into on_mouse_click, not at the beginning or end of Global.asc by itself.

Mariano Cirigliano

Quote from: Khris on Wed 27/10/2010 21:37:17
What you're asking is really really basic stuff; explaining that while struggling with the language border is not going to be fun at all.
Try to get someone who speaks English and Spanish to help you, otherwise this is going to become a huge mess.

Edit: mode7, that's not going to help. LtSmash's code is a small snippet that's supposed to go into on_mouse_click, not at the beginning or end of Global.asc by itself.

The problem is: I do not understand very much like they write to themselves the "SCRIPT" and my questions are:

1-have I to use " EMPTY GAME " or " DEFULT GAME "?
2-What I need is that it is opened and the inventory is closed on having touched the right button of the mouse. But I do not manage to do it. How is "SCRIPT" written?.

My English is not good, sorry.

Thank you very much and I wait for answers.

Khris

I understand the problem, but there is another problem: you can't speak English good enough.

When this problem is solved, the next one will be right around the corner.

Sorry, I'm out.

Mariano Cirigliano

Quote from: Khris on Thu 28/10/2010 01:31:55
I understand the problem, but there is another problem: you can't speak English good enough.

When this problem is solved, the next one will be right around the corner.

Sorry, I'm out.

Ok but, How close the inventory (GUI) to button MouseRight?. ???
I obtained open the inventory (GUI) to button MouseRight!!

Dualnames

Code: ags

[else] if (button == eMouseRight) {  
  gMyGuisName.Visible = !gMyGuisName.Visible; 
}


That's what I'm guessing you want to do. Right-click opens and closes the gui.

Sarebbe piu facile di trovare una persona da questo forum che si puo tradurre per te.
Worked on Strangeland, Primordia, Hob's Barrow, The Cat Lady, Mage's Initiation, Until I Have You, Downfall, Hunie Pop, and every game in the Wadjet Eye Games catalogue (porting)

Khris

That's Italian, right? He's from Argentina and speaks Spanish.

I already told him to get help from a friend who speaks English, he won't listen.

Also he cross-posted and dug up your module thread. Like I said, I'm out.

Dualnames

OMG, I thought he was Italian. EPIC FAIL.

You can't begin to imagine how much I lolled when I saw your reply Khris. :D :D
Worked on Strangeland, Primordia, Hob's Barrow, The Cat Lady, Mage's Initiation, Until I Have You, Downfall, Hunie Pop, and every game in the Wadjet Eye Games catalogue (porting)

Mariano Cirigliano

Quote from: Dualnames on Thu 28/10/2010 11:54:59
Code: ags

[else] if (button == eMouseRight) {  
  gMyGuisName.Visible = !gMyGuisName.Visible; 
}


That's what I'm guessing you want to do. Right-click opens and closes the gui.

Sarebbe piu facile di trovare una persona da questo forum che si puo tradurre per te.

wrote the code that you me sent but only the "GUI" is opened I do not achieve that it is closed. ???


Icey


Paste this in the globalcript under

function on_mouse_click(MouseButton button)

Code: ags

else if(mouse.IsButtonDown(eMouseRight)){
  gGui2.Visible = true;
  
}



then in your gui click it's background and paste this in it's settings for when the player clicks the background.

Code: ags

if (mouse.IsButtonDown(eMouseRight)){
  gGui2.Visible = false;
}


works for me.;)

SMF spam blocked by CleanTalk