How to create a system of game similar to " THE DIG "?.

Started by Mariano Cirigliano, Tue 21/07/2009 17:00:12

Previous topic - Next topic

Mariano Cirigliano

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!. ;)

Galen

In your global code:

Code: ags

#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.

Mariano Cirigliano

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. ;)

Mariano Cirigliano

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.

Galen

I'm working on a template right now, I'm fine-tuning the code to work more like The Dig.

Mariano Cirigliano

Thank you very much, I wait for his your response.
;D

Mariano Cirigliano

I wait for the templete, I continue proving another code but it does not work.


Matti

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.

Mariano Cirigliano

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

Galen

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.

Mariano Cirigliano

Thank you friend, but I do not manage to open the file that you me sent. How do I open it?. Thank you. :(

Vince Twelve

I assume you're not talking about the .zip file.  If you are then let me google that for you.

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.

Mariano Cirigliano

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

densming



SMF spam blocked by CleanTalk