Hello to all, my question is the following one: I am interested in creating a system of game similar to " THE DIG " of LucasArts. I need that all the actions realizen in spite of only pressing the left button of the mouse.
In addition I would like to make something similar in the way I inventory.
I hope that the question is understood.
Thank you!. ;)
In your global code:
#sectionstart on_mouse_click // DO NOT EDIT OR REMOVE THIS LINE
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)
{
if ((GetLocationType(mouse.x, mouse.y) == eLocationNothing) and (GetWalkableAreaAt(mouse.x,mouse.y) != 0))
{
ProcessClick(mouse.x,mouse.y, eModeWalkto); //Clicked on JUST a walkable area
}
else
{
ProcessClick(mouse.x,mouse.y, eModeUse);
}
}
else // right click instead
{
inventory gui name here .Visible = true;
}
}
#sectionend on_mouse_click // DO NOT EDIT OR REMOVE THIS LINE
Hopefully that should help.
Thank you for his your prompt response. This code that you wrote, in order that it he is in use?. I what I need is that all the actions realizen with the left button of the mouse. With the right button it is deposited to the Inventory. And that on having selected an object of the Inventory automatic turns out to be selected in the game.
Thank you!. If it he could send a templete of test one would be grateful for it. ;)
Lament him to inform that the code that he me sent did not work in my AGS. In that way of game I must use it? Default?.
Me might a game of sample send that utilize this system?.
Thank you very much.
I'm working on a template right now, I'm fine-tuning the code to work more like The Dig.
Thank you very much, I wait for his your response.
;D
I wait for the templete, I continue proving another code but it does not work.
Was it complicated a bit?.
I think Crazy will tell you when it's ready.
Also, you can PM him or at least modify you older post instead of posting in a row and bumping up the thread.
Thank you, which happens is that I want to begin with the production of my first commercial game and to be a bit anxious. ;D
http://www.box.net/shared/q8ul52ryjl
I'll post it here if anyone else reads this and wants to have a look. It's not got item-rearranging and you'll need to drag your mouse off of the inventory window due to the way AGS works.
Thank you friend, but I do not manage to open the file that you me sent. How do I open it?. Thank you. :(
I assume you're not talking about the .zip file. If you are then let me google that for you (http://tinyurl.com/nuqvqh).
Take the thedigtemplate.agt file and put it in your AGS folder (where the AGSEditor.exe is installed). Then start a new game and choose the template.
Thank you very much to all, I could make cover the system. Now I am going to begin to create my first commercial game.
A lot of luck and thanks again. ;D
Ha ha! Haven't see lmgtfy.com before. That's hilarious.
Seconded.