Adventure Game Studio

AGS Support => Beginners' Technical Questions => Topic started by: Mariano Cirigliano on Tue 21/07/2009 17:00:12

Title: How to create a system of game similar to " THE DIG "?.
Post by: Mariano Cirigliano on Tue 21/07/2009 17:00:12
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!. ;)
Title: Re: How to create a system of game similar to " THE DIG "?.
Post by: Galen on Tue 21/07/2009 17:29:57
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.
Title: Re: How to create a system of game similar to " THE DIG "?.
Post by: Mariano Cirigliano on Tue 21/07/2009 17:35:07
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. ;)
Title: Re: How to create a system of game similar to " THE DIG "?.
Post by: Mariano Cirigliano on Tue 21/07/2009 17:51:37
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.
Title: Re: How to create a system of game similar to " THE DIG "?.
Post by: Galen on Tue 21/07/2009 18:04:46
I'm working on a template right now, I'm fine-tuning the code to work more like The Dig.
Title: Re: How to create a system of game similar to " THE DIG "?.
Post by: Mariano Cirigliano on Tue 21/07/2009 18:06:46
Thank you very much, I wait for his your response.
;D
Title: Re: How to create a system of game similar to " THE DIG "?.
Post by: Mariano Cirigliano on Tue 21/07/2009 18:21:56
I wait for the templete, I continue proving another code but it does not work.
Title: Re: How to create a system of game similar to " THE DIG "?.
Post by: Mariano Cirigliano on Tue 21/07/2009 18:55:12
Was it complicated a bit?.
Title: Re: How to create a system of game similar to " THE DIG "?.
Post by: Matti on Tue 21/07/2009 19:28:27
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.
Title: Re: How to create a system of game similar to " THE DIG "?.
Post by: Mariano Cirigliano on Tue 21/07/2009 20:59:53
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
Title: Re: How to create a system of game similar to " THE DIG "?.
Post by: Galen on Tue 21/07/2009 21:14:08
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.
Title: Re: How to create a system of game similar to " THE DIG "?.
Post by: Mariano Cirigliano on Tue 21/07/2009 21:33:06
Thank you friend, but I do not manage to open the file that you me sent. How do I open it?. Thank you. :(
Title: Re: How to create a system of game similar to " THE DIG "?.
Post by: Vince Twelve on Tue 21/07/2009 22:04:25
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.
Title: Re: How to create a system of game similar to " THE DIG "?.
Post by: Mariano Cirigliano on Tue 21/07/2009 22:17:56
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
Title: Re: How to create a system of game similar to " THE DIG "?.
Post by: densming on Wed 22/07/2009 03:24:23
Ha ha!  Haven't see lmgtfy.com before.  That's hilarious.
Title: Re: How to create a system of game similar to " THE DIG "?.
Post by: Matti on Wed 22/07/2009 03:48:12
Seconded.