Menu

Show posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.

Show posts Menu

Topics - Mariano Cirigliano

#1
Hello, I would like to make a menu to save and load the game in which a screenshot display. So far I never got to do it. Please help!. If you can send us an TEMPLATE.
#2
Some voices remain infinitely with the text and to go on to the following dialog I must touch the button of the mouse. In some cases it me works well and in others not.

That I must do?.

Thank you.
#3
My code:

@12
Character: ¿¿41.489.590??.
Char1: ¡¡CORRECTO!!... me sorprende tu agilidad mental, como te prometí aquí tienes el objeto del que te hablé antes.
Character: Muchas gracias, veamos de que se trata.
Char1: Aquí tienes.
option-off-forever 8
option-off-forever 9
option-off-forever 10
option-off-forever 11
option-off-forever 12
option-off-forever 13
option-off-forever 14
option-off-forever 15
player.AddInventory(imoneda);
return

ERROR!!

Hello everybody, I need to conclude the dialog the CHARACTER receives an item to the INVENTORY. The object is called MONEDA. I hope you will understand the problem. Thank you.
#4
i am programing my game, allmost is working but i have a great problem...
when you make clic in hotspot the dialog start correctly, then, when you have to use an object in the inventary the dialog for the action start correctly, but the something its working very bad, when you make clic in hotspot allways its shoot the dialog that de caracter animated will talk without using none object

my code:

// main global script file

//--------------------------------------------------------------------------------------------------------------
// Largo's Savegames with Screenshots
//--------------------------------------------------------------------------------------------------------------
// Definitions

// Define screenshot width
#define SL_WIDTH  320     
// Define screenshot height
#define SL_HEIGHT 240     
// Define default screenshot
#define SL_EMPTY_SPRITE 2

// Variables

String text;                                                              // Stores the typed text
int saveslot = 0;                                                         // Stores the selected savegame slot
int totalsaves = 0;                                                       // Stores the total number of savegames
DynamicSprite *screenshot;                                                // Stores the screenshot

// Functions

function sl_save() {
  Wait(1);
  screenshot = DynamicSprite.CreateFromScreenShot(SL_WIDTH, SL_HEIGHT);   // Create screenshot of current game
  if (screenshot != null) {
    btnSaveScreen.NormalGraphic = screenshot.Graphic;                     // Display current screenshot
  }
  txtSaveName.Text = "";                                                  // Clear Text box
  lstSaveGames.FillSaveGameList();                                        // Fill List Box with saved games
  lstSaveGames.SelectedIndex = -1;                                        // Deselect savegame slots
  totalsaves = lstSaveGames.ItemCount;                                    // Count how many saved games there are
  gSave.Visible = true;                                                   // Opens the save GUI
  gSave.Centre();                                                         // Centres the save GUI
  mouse.Mode = eModePointer;                                              // Set the pointer cursor
}

function sl_load() {
  lstLoadGames.FillSaveGameList();                                        // Fill List Box with saved games
  lstLoadGames.SelectedIndex = -1;                                        // Deselect savegame slots
  totalsaves = lstLoadGames.ItemCount;                                    // Count how many saved games there are
  gLoad.Visible = true;                                                   // Opens the load GUI
  gLoad.Centre();                                                         // Centres the load GUI
  mouse.Mode = eModePointer;                                              // Set the pointer cursor
}
//--------------------------------------------------------------------------------------------------------------

#sectionstart game_start  // DO NOT EDIT OR REMOVE THIS LINE
function game_start() { // called when the game starts, before the first room is loaded
game.screenshot_width = 640;
game.screenshot_height = 480;
}

#sectionstart repeatedly_execute  // DO NOT EDIT OR REMOVE THIS LINE
function repeatedly_execute()
{ // put anything you want to happen every game cycle in here

if (gInventory.Visible == true)
  {
   if (mouse.x > 210 && mouse.x < 810 && mouse.y > 160 && mouse.y < 560)
    {
     if (mouse.IsButtonDown(eMouseRight))
      {
     gInventory.Visible = false;
      }
   }
  }
}

#sectionstart on_key_press  // DO NOT EDIT OR REMOVE THIS LINE
function on_key_press(eKeyCode keycode) { // called when a key is pressed. keycode holds the key's ASCII code
  if (IsGamePaused()) keycode = 0;                          // game paused, so don't react to keypresses
 
  if (keycode == 17) QuitGame(1);                           // Ctrl-Q
  if (keycode == 363) sl_save();                            // F5       
  if (keycode == 365) sl_load();                            // F7
  if (keycode == 367) RestartGame();                        // F9
  if (keycode == 434) SaveScreenShot("screenshot.bmp");     // F12
  if (keycode == 19) Debug(0,0);                            // Ctrl-S, give all inventory
  if (keycode == 22) Debug(1,0);                            // Ctrl-V, version
  if (keycode == 1) Debug(2,0);                             // Ctrl-A, show walkable areas
  if (keycode == 24) Debug(3,0);                            // Ctrl-X, teleport to room
}

#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 (gInventory.Visible == false) //If the inventory window is closed
    {
     if ((GetLocationType(mouse.x, mouse.y) == eLocationNothing) && (GetWalkableAreaAt(mouse.x,mouse.y) != 0))
     {
      ProcessClick(mouse.x,mouse.y, eModeWalkto); //Clicked on JUST a walkable area
     }
     else
     {
      if(player.ActiveInventory == null)
       {
        ProcessClick(mouse.x,mouse.y, eModeInteract); //If we've clicked on a hotspot or object or character etc.
       }
      else
       {
        ProcessClick(mouse.x,mouse.y, eModeUseinv); //If we've used the inventory on a hotspot or object or character etc.
       }
     }
    }
  }
   
   
    //ProcessClick(mouse.x,mouse.y, mouse.Mode);

  else //if (mouse.IsButtonDown(eMouseRight))// right-click, so cycle cursor
  {   
    //mouse.SelectNextMode();
    if (gInventory.Visible == false)
     {
       gInventory.Visible = true;
       mouse.Mode = eModeInteract;
       Wait(5);
     }
    else
     {
       gInventory.Visible = false;
     }
  }
}

#sectionstart interface_click  // DO NOT EDIT OR REMOVE THIS LINE
function interface_click(int interface, int button) { // OBSOLETE, NOT USED IN AGS 2.7 AND LATER VERSIONS
}

#sectionstart unhandled_event
function unhandled_event (int what, int type) {
}

function dialog_request(int param)
{

if (gInventory.Visible == false)
{
  gInventory.Visible = true;
  mouse.Mode = eModeInteract;
}
else
{
  gInventory.Visible = false;
}

}

// Save GUI
function gSave_OnClick(GUI *theGui, MouseButton button) {
  lstSaveGames.SelectedIndex = -1;                              // Deselect savegame slots
}

function btnSaveOK_OnClick(GUIControl *control, MouseButton button) {
  if (lstSaveGames.SelectedIndex >= 0) {                        // If you've selected a savegame slot
    saveslot = lstSaveGames.SelectedIndex;                      // Get the selected savegame
    text = txtSaveName.Text;                                    // Get the typed text
    if (screenshot != null) {
      screenshot.Delete();
      btnSaveScreen.NormalGraphic = SL_EMPTY_SPRITE;            // Resets the screenshot     
    }
    gSave.Visible = false;
    mouse.Mode = eModeWalkto;
    Wait(1);
    SaveGameSlot(lstSaveGames.SaveGameSlots[saveslot],text);    // Overwrites the selected game
  }
  else {                                                        // Save the game in a new slot
    if (totalsaves < 50) {                                      // If the savegame limit is not reached (50)
      text = txtSaveName.Text;                                  // Get the typed text
      if (text == "") {
        Display("Please enter a name for your savegame.");      // If player didn't enter a name, tell them
      }
      else {                                                    // Proceed as usual
        if (screenshot != null) {
          screenshot.Delete();
          btnSaveScreen.NormalGraphic = SL_EMPTY_SPRITE;        // Resets the screenshot
        }
        gSave.Visible = false;
        mouse.Mode = eModeWalkto;
        Wait(1);
        SaveGameSlot(totalsaves+1,text);                        // Saves game (text as description)
      }
    }
    else Display("All save slots are full. Please overwrite a previous save.");
  }
}

function btnSaveCancel_OnClick(GUIControl *control, MouseButton button) {
  gSave.Visible = false;
  mouse.Mode = eModeWalkto;
  if (screenshot != null) {
    screenshot.Delete();
    btnSaveScreen.NormalGraphic = SL_EMPTY_SPRITE;              // Resets the screenshot
  }
}

function lstSaveGames_OnSelectionChange(GUIControl *control) {
  // Updates textbox contents when selecting an existing slot
  txtSaveName.Text = lstSaveGames.Items[lstSaveGames.SelectedIndex];
}



// Load GUI
function gLoad_OnClick(GUI *theGui, MouseButton button) {
  lstLoadGames.SelectedIndex = -1;                              // Deselect savegame slots
}

function btnLoadOK_OnClick(GUIControl *control, MouseButton button) {
  if (lstLoadGames.SelectedIndex >= 0) {
    saveslot = lstLoadGames.SelectedIndex;                      // Gets the selected slot
    gLoad.Visible = false;
    mouse.Mode = eModeWalkto;
    if (screenshot != null) {
      screenshot.Delete();
      btnLoadScreen.NormalGraphic = SL_EMPTY_SPRITE;            // Resets the screenshot
    }
    RestoreGameSlot(lstLoadGames.SaveGameSlots[saveslot]);      // Restores the selected slot
  }
  else if (totalsaves>0) Display("Please select a savegame.");
  else Display("There are no savegames yet!");
}

function btnDelete_OnClick(GUIControl *control, MouseButton button) {
  if (lstLoadGames.SelectedIndex > -1) {                        // You've selected a saveslot
    saveslot = lstLoadGames.SelectedIndex;                      // Gets the selected slot
    DeleteSaveSlot(savegameindex[saveslot]);                    // Deletes the savegame
    if (screenshot != null) {
      screenshot.Delete();
      btnLoadScreen.NormalGraphic = SL_EMPTY_SPRITE;            // Resets the screenshot
    }
    lstLoadGames.FillSaveGameList();                            // Fill List Box with saved games
    lstLoadGames.SelectedIndex = -1;                            // Deselect savegame slots
    totalsaves = lstLoadGames.ItemCount;
  }
  else Display("Select a savegame to delete.");
}

function btnLoadCancel_OnClick(GUIControl *control, MouseButton button) {
  gLoad.Visible = false;
  mouse.Mode = eModeWalkto;
  if (screenshot != null) {
    screenshot.Delete();
    btnLoadScreen.NormalGraphic = SL_EMPTY_SPRITE;              // Resets the screenshot
  }
}

function lstLoadGames_OnSelectionChange(GUIControl *control) {
  // Updates screenshot display when selecting a different slot
  saveslot = lstLoadGames.SelectedIndex;                        // Gets the selected slot
  screenshot = DynamicSprite.CreateFromSaveGame(lstLoadGames.SaveGameSlots[saveslot], SL_WIDTH, SL_HEIGHT);
  if (screenshot != null) {
    btnLoadScreen.NormalGraphic = screenshot.Graphic;           // Updates the screenshot
  }
}


ACTION HOTSPOT EXAMPLE:


function hplanta_Interact()
{
player.Walk(77,  501, eBlock,  eWalkableAreas);
player.Say ("Esa planta no me interesa.");
}


function harboles_Interact()
{
player.Say ("Nunca me gustaron los árboles y mucho menos estos.");
}

function harboles_UseInv()
{
player.Say ("Eso no tiene sentido.");
}

function hcamino_WalkOn()
{
player.ChangeRoom(2,  152,  613);
}

function hcamino_Interact()
{
player.Walk (965,  462,  eBlock,  eWalkableAreas);
player.ChangeRoom(2,  152,  613);

}

Thank!.
#5


Uploaded with ImageShack.us



I have these two GUI simple but i cannot create a correct SCRIPT for both. What i need is that one salve heading and the other the load. Thank you, i hope response, greetings!
#6
1-SAVE GAME AND LOAD CAPTURE SECREEN (http://www.megaupload.com/?d=DQCO56K3)

2-PROBLEM THE DIG: (http://www.box.net/shared/q8ul52ryjl) This TEMPLATE by created "GALEN"

What I need is to form TEMPLATES as seemed as possible to LucasArts's game " THE DIG " and for it a user of the forum "GALEN" some time ago sent me TEMPLATES2.

But I have two problems.

1-I need to have inTEMPLATES a way SAVE GAME AND LOAD GAME CAPTURE, as that it has TEMPLATES 1.

2-I need that the resolution of screen is a 1024 x 768

Help!! ... thank you very much to all!.

ESPAÃ'OL:

Lo que yo necesito es formar un TEMPLATE lo más parecido posible al juego de LucasArts "THE DIG" y para eso un usuario del foro "GALEN" hace algún tiempo me envió el TEMPLATE 2.

Pero tengo dos problemas.

1- Necesito tener en el TEMPLATE un modo SAVE GAME AND LOAD GAME CAPTURE, como el que tiene el TEMPLATE 1.

2- Necesito que la resolución de pantalla sea 1024 x 768

Ayuda!!... muchas gracias a todos!. (Lo subo también en español por si alguien que habla el idioma lo lee).

#7
I have a "GUI" and need that it recognizes "keyboard"

On having touched the letter "S" I need that it is opened " QUITGAME (0);

On having touched the letter "N" I need that one comes back to the game.

I hope that my question is understood.

Thanks to all!. ???
#8
Code:

// main global script file

//--------------------------------------------------------------------------------------------------------------
// Largo's Savegames with Screenshots
//--------------------------------------------------------------------------------------------------------------
// Definitions

// Define screenshot width
#define SL_WIDTH  128 
// Define screenshot height
#define SL_HEIGHT 96 
// Define default screenshot
#define SL_EMPTY_SPRITE 2

// Variables

String text;                                                              // Stores the typed text
int saveslot = 0;                                                         // Stores the selected savegame slot
int totalsaves = 0;                                                       // Stores the total number of savegames
DynamicSprite *screenshot;                                                // Stores the screenshot

// Functions

function sl_save() {
  Wait(1);
  screenshot = DynamicSprite.CreateFromScreenShot(SL_WIDTH, SL_HEIGHT);   // Create screenshot of current game
  if (screenshot != null) {
    btnSaveScreen.NormalGraphic = screenshot.Graphic;                     // Display current screenshot
  }
  txtSaveName.Text = "";                                                  // Clear Text box
  lstSaveGames.FillSaveGameList();                                        // Fill List Box with saved games
  lstSaveGames.SelectedIndex = -1;                                        // Deselect savegame slots
  totalsaves = lstSaveGames.ItemCount;                                    // Count how many saved games there are
  gSave.Visible = true;                                                   // Opens the save GUI
  gSave.Centre();                                                         // Centres the save GUI
  mouse.Mode = eModePointer;                                              // Set the pointer cursor
}

function sl_load() {
  lstLoadGames.FillSaveGameList();                                        // Fill List Box with saved games
  lstLoadGames.SelectedIndex = -1;                                        // Deselect savegame slots
  totalsaves = lstLoadGames.ItemCount;                                    // Count how many saved games there are
  gLoad.Visible = true;                                                   // Opens the load GUI
  gLoad.Centre();                                                         // Centres the load GUI
  mouse.Mode = eModePointer;                                              // Set the pointer cursor
}
//--------------------------------------------------------------------------------------------------------------

#sectionstart game_start  // DO NOT EDIT OR REMOVE THIS LINE
function game_start() { // called when the game starts, before the first room is loaded
game.screenshot_width = 800;
game.screenshot_height = 600;
}

#sectionstart repeatedly_execute  // DO NOT EDIT OR REMOVE THIS LINE
function repeatedly_execute() { // put anything you want to happen every game cycle in here
}

#sectionstart on_key_press  // DO NOT EDIT OR REMOVE THIS LINE
function on_key_press(eKeyCode keycode) { // called when a key is pressed. keycode holds the key's ASCII code
  if (IsGamePaused()) keycode = 0;                          // game paused, so don't react to keypresses
 
  if (keycode == 17) QuitGame(1);                           // Ctrl-Q
  if (keycode == 363) sl_save();                            // F5       
  if (keycode == 365) sl_load();                            // F7
  if (keycode == 367) RestartGame();                        // F9
  if (keycode == 434) SaveScreenShot("screenshot.bmp");     // F12
  if (keycode == 19) Debug(0,0);                            // Ctrl-S, give all inventory
  if (keycode == 22) Debug(1,0);                            // Ctrl-V, version
  if (keycode == 1) Debug(2,0);                             // Ctrl-A, show walkable areas
  if (keycode == 24) Debug(3,0);                            // Ctrl-X, teleport to room
}

#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) ProcessClick(mouse.x,mouse.y, mouse.Mode);
  else if (button == eMouseRight) mouse.SelectNextMode();
}

#sectionstart interface_click  // DO NOT EDIT OR REMOVE THIS LINE
function interface_click(int interface, int button) { // OBSOLETE, NOT USED IN AGS 2.7 AND LATER VERSIONS
}

#sectionstart unhandled_event
function unhandled_event (int what, int type) {
}

function dialog_request(int param) {
}

// Save GUI
function gSave_OnClick(GUI *theGui, MouseButton button) {
  lstSaveGames.SelectedIndex = -1;                              // Deselect savegame slots
}

function btnSaveOK_OnClick(GUIControl *control, MouseButton button) {
  if (lstSaveGames.SelectedIndex >= 0) {                        // If you've selected a savegame slot
    saveslot = lstSaveGames.SelectedIndex;                      // Get the selected savegame
    text = txtSaveName.Text;                                    // Get the typed text
    if (screenshot != null) {
      screenshot.Delete();
      btnSaveScreen.NormalGraphic = SL_EMPTY_SPRITE;            // Resets the screenshot     
    }
    gSave.Visible = false;
    mouse.Mode = eModeWalkto;
    Wait(1);
    SaveGameSlot(lstSaveGames.SaveGameSlots[saveslot],text);    // Overwrites the selected game
  }
  else {                                                        // Save the game in a new slot
    if (totalsaves < 50) {                                      // If the savegame limit is not reached (50)
      text = txtSaveName.Text;                                  // Get the typed text
      if (text == "") {
        Display("Please enter a name for your savegame.");      // If player didn't enter a name, tell them
      }
      else {                                                    // Proceed as usual
        if (screenshot != null) {
          screenshot.Delete();
          btnSaveScreen.NormalGraphic = SL_EMPTY_SPRITE;        // Resets the screenshot
        }
        gSave.Visible = false;
        mouse.Mode = eModeWalkto;
        Wait(1);
        SaveGameSlot(totalsaves+1,text);                        // Saves game (text as description)
      }
    }
    else Display("All save slots are full. Please overwrite a previous save.");
  }
}

function btnSaveCancel_OnClick(GUIControl *control, MouseButton button) {
  gSave.Visible = false;
  mouse.Mode = eModeWalkto;
  if (screenshot != null) {
    screenshot.Delete();
    btnSaveScreen.NormalGraphic = SL_EMPTY_SPRITE;              // Resets the screenshot
  }
}

function lstSaveGames_OnSelectionChange(GUIControl *control) {
  // Updates textbox contents when selecting an existing slot
  txtSaveName.Text = lstSaveGames.Items[lstSaveGames.SelectedIndex];
}



// Load GUI
function gLoad_OnClick(GUI *theGui, MouseButton button) {
  lstLoadGames.SelectedIndex = -1;                              // Deselect savegame slots
}

function btnLoadOK_OnClick(GUIControl *control, MouseButton button) {
  if (lstLoadGames.SelectedIndex >= 0) {
    saveslot = lstLoadGames.SelectedIndex;                      // Gets the selected slot
    gLoad.Visible = false;
    mouse.Mode = eModeWalkto;
    if (screenshot != null) {
      screenshot.Delete();
      btnLoadScreen.NormalGraphic = SL_EMPTY_SPRITE;            // Resets the screenshot
    }
    RestoreGameSlot(lstLoadGames.SaveGameSlots[saveslot]);      // Restores the selected slot
  }
  else if (totalsaves>0) Display("Please select a savegame.");
  else Display("There are no savegames yet!");
}

function btnDelete_OnClick(GUIControl *control, MouseButton button) {
  if (lstLoadGames.SelectedIndex > -1) {                        // You've selected a saveslot
    saveslot = lstLoadGames.SelectedIndex;                      // Gets the selected slot
    DeleteSaveSlot(savegameindex[saveslot]);                    // Deletes the savegame
    if (screenshot != null) {
      screenshot.Delete();
      btnLoadScreen.NormalGraphic = SL_EMPTY_SPRITE;            // Resets the screenshot
    }
    lstLoadGames.FillSaveGameList();                            // Fill List Box with saved games
    lstLoadGames.SelectedIndex = -1;                            // Deselect savegame slots
    totalsaves = lstLoadGames.ItemCount;
  }
  else Display("Select a savegame to delete.");
}

function btnLoadCancel_OnClick(GUIControl *control, MouseButton button) {
  gLoad.Visible = false;
  mouse.Mode = eModeWalkto;
  if (screenshot != null) {
    screenshot.Delete();
    btnLoadScreen.NormalGraphic = SL_EMPTY_SPRITE;              // Resets the screenshot
  }
}

function lstLoadGames_OnSelectionChange(GUIControl *control) {
  // Updates screenshot display when selecting a different slot
  saveslot = lstLoadGames.SelectedIndex;                        // Gets the selected slot
  screenshot = DynamicSprite.CreateFromSaveGame(lstLoadGames.SaveGameSlots[saveslot], SL_WIDTH, SL_HEIGHT);
  if (screenshot != null) {
    btnLoadScreen.NormalGraphic = screenshot.Graphic;           // Updates the screenshot
  }
}

How change dimension of the capture of screen in the SaveGame and LoadGame?. ???
#9
Thank!... I need the interface of The Dig (LucasArts) ???
#11
I need CONTROL TEMPLATE equally to the game THE DIG of LucasArts but with resolution 1024 x 768

Thank you very much!.
#12
Hello, how must I do to translate a game with AGS 3.1?. ???
#13
Hello, I need help to create a game using OVERHOSPOT and a menu SAVE AND LOAD IMAGE.
Thank you very much!.
#14
Hello, I need CONTROL YOURSELF similar to the game DRASCULA.
The actions must change with the right button of the mouse and there must appear the name of the HOTSPOT and the action under the screen.
Example: " Walk to Street ".

I hope that he understands himself since my Englishman is not very good, thank you.
#15
Hello, I comment to them which is the problem that I have this time.
I have two templetes that I want to mix to be able to produce a game. But when I them mix the game it does not work due to a mistake of programming.
I would like to know which is the surest way of mixing two templetes?.
Thank you very much.
#16
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!. ;)
#17
Hello, I have a question that probably someone could answer me.
They saw the feasible file that comes with a text that he says Chris Jones and Adventure Game Studio run - should steal).
My question is how do I eliminate this message?, since I want to make something more personal. I prefer adding the name AGS in the credits of the game.
Good I hope that they could help me.
Thank you very much.
#18
Hello, my name is Mariano and I am a creator of graphical adventures.
I have a question, how can I make way record / load game with an image of the game?.
I hope that my question is understood since my Englishman is not very good.
Thank you very much. ;D
SMF spam blocked by CleanTalk