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

Messages - hedgefield

#481
Wow, that's looking really good! I love those backgrounds, and the characters are great. It's always nice do do something else entirely, and it sounds like fun to me.
#482
This stuff is pretty good. :) looking forward to the next chapters.
#483
Critics' Lounge / Re: Help My Super Hero
Sat 09/07/2005 20:47:31
No cliché superhero story can do without a mysterious(ly) hot superheroine who just happens to be working for the bad guy.

Enter:

#484
General Discussion / Re: Mittens 2006?
Sat 09/07/2005 11:24:13
I hereby express my liking for the Holland scheme, and I'm sure Mozesh would too.
#485
Yes the global script. The first line goes way at the top, the second chunk under repeatedly_execute and the last bit under sectionstart_on_event

Do please note the

function repeatedly_execute() {
// put anything you want to happen every game cycle here


and the

function on_event (int event,int data) { 

Which should already be in the script.
#486
I've been starting to have similar issues (even though my pc is top-of-the-bill) where the background music skips for a fraction of a second everytime the dialog options box appears.
#487
General Discussion / Re: London Subway
Thu 07/07/2005 15:56:08
Quote from: Cluey on Thu 07/07/2005 15:53:09Frankly, I hope they fucking rot in hell.
Here, here...
#488
I think you have to manually set the characterview in every interaction script you make for a hotspot (look, use etc). This way he will always turn towards the hotspot when he reaches the walk-to point, no matter which direction he came from.



*Didn't see the part about the x-y value method, sorry. But you don't have to set the values, you only have to specify which way the character should be facing when he is on the walk-to point. E.g. you main walkcycle is view 1, and you want him to face right, then you say SetCharacterViewEx (EGO, 1, 2, ALIGN_CENTRE); Copy n paste for each interaction, changing the second number for the direction and it should work fine.
#489
I think your best bet would be Ahmet's AGS fight game source, located here.
#490
I use:
----------------------------------------------------------------------------------------------------
int Over;string Name;int CharId, Direction, dx, dy;

#sectionstart repeatedly_execute  // DO NOT EDIT OR REMOVE THIS LINE

function repeatedly_execute() {
// put anything you want to happen every game cycle here

    if (IsOverlayValid(Over)){
      GetLocationName(mouse.x,mouse.y,Name);
      SetTextOverlay(Over,mouse.x-25,mouse.y-18,100,1,15,Name);}
                  //mouse.x/mouse.y=position, 100=width, 1=?font?, 15=color

#sectionstart on_event   // DO NOT EDIT OR REMOVE THIS LINE

function on_event (int event,int data) { 
    if (event==ENTER_ROOM) {
      GetLocationName (mouse.x,mouse.y,Name);
      Over=CreateTextOverlay(mouse.x-25,mouse.y-18,100,1,15,Name);}
                       //mouse.x/mouse.y=position, 100=width, 1=?font?, 15=color
    else if (event==LEAVE_ROOM) {   
      RemoveOverlay (Over);}
      //Needs additional script to remove the overlay during the actual interaction.
}
------------------------------------------------------------------------------------------------------
A bit more complicated, but it gets the job done :)
#491
1. Some older codes could stop responding because 2.7 handles certain scripts a little differently. If you started under 2.6, I recommend you finish it under 2.6.
2. I'm not sure which interface you mean here. There is some coding involved in getting an overlay for the mouse cursor to work. I use a similar system. I will round up the code for you later.
3. There's nothing wrong there, 2.62 introduced this. The fact that the rest is white indicates that you are currently not editing those areas. The screenshots you are seeing are probaby from older versions, where this feature was not implemented yet.
4. I'm not sure, but I do believe that's possible. There is no limit for width, but height is limited IIRQ...

Update
Concerning #2...
#492
Critics' Lounge / Re: C&C for bg concept art
Tue 05/07/2005 12:41:46
That's looking great. I'm a big fan of countries like Egypt and their cultures. We need more of those games...
#493
General Discussion / Re: google madass names!
Tue 05/07/2005 12:36:50
According to Google I work at the Dutch Playboy site, and I participated in Dakar 2005. Ho-kaaay...
#494
Great, that did it, thanks a lot! :) Now finally it all works correctly. Whew.
#495
Edited by Gilbot
Opps. Sorry, I should have replied but accidentally modified your post (which erased a bunch of its content :P), this is what would have happened for a tired dumb who's still working at 7:30p.m.. Anyway, I think you can understand what I wrote here.

Quote
There is one more modification to do, and that is copy the preparation codes from on_key_press to interface_click, otherwise the save/load GUIs wont read the previously saved games when you click on their icon in the iconbar, only when you open them using the hotkeys.
Yes, like I mentioned, a simpler way is just calling directly on_key_press() within interface_click() (see my last post). However, a more systematic (and more readible) way is to put those codes into functions, like:
Code: ags

function SaveGUI(){
  //blah blabla
}

function LoadGUI(){
  //blah blabla
}


and then call these functions within on_key_press() and interface_click().



Edited by Largo
Heh, don't worry, my frustration cache is all filled up with the script, so there's no more room for this. :)

Making this into functions would indeed be a good alternative. Though I haven't quite advanced far enough to be building complicated constructions like that.

Anyway, I just tested it again and with the current script the savegames text won't display, again...

I will go ahead and predict now it's probably a brace issue... ::)
---------------------------------------------------------------------------------------------------
Main global script file
string text;int index;

sectionstart_on_key_press
function on_key_press(int keycode) {
  // called when a key is pressed. keycode holds the key's ASCII code
  if (IsGamePaused() == 1) keycode=0;     // game paused, so don't react to keypresses
  if (keycode==17) GUIOn(QUITDIALOG);     // Ctrl-Q     
  if (keycode==363) {                     // F5
     SetTextBoxText(5,0,"");              // Clear Text box
     ListBoxSaveGameList(5,1);            // Fill List Box with saved games
     index=ListBoxGetNumItems(5,1);       // Count how many saved games there are         
     if (index>19){                       // If saved games 20 (maximum)
     Display("You must overwrite a previously saved game.");  // Display warning
    }
     GUIOn(SAVEDIALOG);                      // Bring Save interface on             
}
  if (keycode==365)  {                    // F7
     ListBoxSaveGameList(4,0);            // Fill List box with saved games
     GUIOn(LOADDIALOG);                   // Bring restore Interface on
}
  if (keycode==367) RestartGame();                   // F9
  if (keycode==434) SaveScreenShot("scrnshot.bmp");  // F12
  if (keycode==9)   show_inventory_window();         // Tab, show inventory

  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_interface_click
function interface_click(int interface, int button) {
  if (interface == ICONBAR) {
    if (button == 4) {  // show inventory
      show_inventory_window();
    }
    else if (button == 6) {   // save game
      SetTextBoxText(5,0,"");              // Clear Text box
      ListBoxSaveGameList(5,1);            // Fill List Box with saved games
      index=ListBoxGetNumItems(5,1);       // Count how many saved games there are         
      if (index>19){                       // If saved games 20 (maximum)
      Display("You must overwrite a previously saved game.");  // Display warning
    }
      GUIOn(SAVEDIALOG);                   // Bring Save interface on             
}
    else if (button == 7) {  // load game
     ListBoxSaveGameList(4,0);
     GUIOn (LOADDIALOG); }
    else if (button == 8 )   // quit
      GUIOn (QUITDIALOG);
    else if (button == 9)    // about
      Display("The Majestic Conspiracy (c) 2005 Tim Hengeveld.");
  }  // end if interface ICONBAR

  if (interface == INVENTORY) {
    // They clicked a button on the Inventory GUI
   
    if (button == 1) {
      // They pressed SELECT, so switch to the Get cursor
      SetCursorMode (MODE_USE);
      // But, override the appearance to look like the arrow
      SetMouseCursor (6);
    }
   
    if (button == 2) {
      // They pressed LOOK, so switch to that mode
      SetActiveInventory(-1);
      SetCursorMode(MODE_LOOK);
    }
    if (button == 3) {
      // They pressed the OK button, close the GUI
      GUIOff (INVENTORY);
      SetDefaultCursor();
    }

    if ((button == 4) && (game.top_inv_item < game.num_inv_items - game.num_inv_displayed)) {
      // scroll down
      game.top_inv_item = game.top_inv_item + game.items_per_line;
    }
    if ((button == 5) && (game.top_inv_item > 0)){
      // scroll up
      game.top_inv_item = game.top_inv_item - game.items_per_line;
    }
  }

   if (interface == QUITDIALOG) {
     if (button == 0) {
       QuitGame (0);
     }
     if (button == 1) {
       GUIOff (QUITDIALOG);
    }
  }

   if (interface== LOADDIALOG) {                                // if Restore interface
     if (button==1) {                                           // if cancel is pressed
      InterfaceOff(4);                                          // Close interface
    }
     else {
      index=ListBoxGetSelected(4,0);                            // else get the selected game
      RestoreGameSlot(savegameindex[index]);}                   // restore the game
    }

     if (interface== SAVEDIALOG) {                              // if save interface
       SetTextBoxText(5,0,"");                                  // Clear Text box
       ListBoxSaveGameList(5,1);                                // Fill List Box with saved games
       index=ListBoxGetNumItems(5,1);                           // Count how many saved games there are         
       if (index>19){                                           // If saved games 20 (maximum)
       Display("You must overwrite a previously saved game.");  // Display warning
    }

     if (button==0) {                                 // if enter is pressed
       index=ListBoxGetNumItems(5,1);                 // Count saved games
     if (index<20) {                                  // if less than 20
       GetTextBoxText(5,0,text);                      // Get the typed text
       InterfaceOff(5);                               // Close interface
       SaveGameSlot(index+1,text);                    // Save game (text as description)
    }   
     else {                                           // if saved games are 20
       index=ListBoxGetSelected(5,1);                 // Get the selected save game
       GetTextBoxText(5,0,text);                      // Get the typed text
       InterfaceOff(5);                               // Close the interface
       SaveGameSlot(savegameindex[index],text);}      // Overwrite the selected game
    }         

     if (button==2) {
     InterfaceOff(5);                                 // if cancel is pressed close interface
  }
}
}
--------------------------------------------------------------------------------------------------
Load GUI = 4
  -Object:Listbox = 0
  -Object:Button = 1
Save GUI = 5
  -Object:Textbox = 0
  -Object:Listbox = 1
  -Object:Button = 2
#496
I've been trying to get a custom save/load GUI in place, following the GAC tutorials, and I'm at the verge of cracking it. Even though I was going to refrain from asking for help, I can't get my mind around the following problem:

I open the save GUI and save. Yes. That works. Savefile appears. All good. BUT, when I go to the load GUI after that, the savegame is nowhere to be found. So I go back to the save GUI, where it now appears in the listbox. However, it's only the selection border, there is no text in the slot. So I go back to the load GUI. Savegame now appears there also, but no text either. It loads fine though. Then there is the issue where I cannot select any other savegame but the first to overwrite. It always jumps back to the first savegame.

For the life of me I cannot figure out what it is. I've been rearranging the script for a good hour now, and each time something changes, but it doesn't fix anything. Here's what I have:

Code: ags
// main global script file
string text;int index;


Code: ags
#sectionstart on_key_press  // DO NOT EDIT OR REMOVE THIS LINE
function on_key_press(int keycode) {
  // called when a key is pressed. keycode holds the key's ASCII code
  if (IsGamePaused() == 1) keycode=0;     // game paused, so don't react to keypresses
  if (keycode==17)  //QuitGame(1);          // Ctrl-Q
     GUIOn(QUITDIALOG);
  if (keycode==363) //SaveGameDialog();   // F5
     //SetTextBoxText(5,0,"");              // Clear Text box
     //ListBoxSaveGameList(5,1);            // Fill List Box with saved games
     //index=ListBoxGetNumItems(5,1);       // Count how many saved games there are          
     //if (index>19){                       // If saved games 20 (maximum)
     //Display("You must overwrite a previously saved game.");  // Display warning
     //}
     GUIOn(SAVEDIALOG);                      // Bring Save interface on             
  if (keycode==365) //RestoreGameDialog();  // F7
     //ListBoxSaveGameList(4,0);            // Fill List box with saved games 
     GUIOn(LOADDIALOG);                      // Bring restore Interface on
  if (keycode==367) RestartGame();  // F9
  if (keycode==434) SaveScreenShot("scrnshot.bmp");  // F12
  if (keycode==9)   show_inventory_window();  // Tab, show inventory

  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
}

As you can see, I've commented out the additional lines for the save and load GUI, because when I uncomment them, every single key on the keyboard brings up both the save and the load GUI.

Code: ags
#sectionstart interface_click  // DO NOT EDIT OR REMOVE THIS LINE
function interface_click(int interface, int button) {
  if (interface == ICONBAR) {
    if (button == 4) {  // show inventory
      show_inventory_window();
    }
    else if (button == 5) {   // use selected inventory
      if (character[ GetPlayerCharacter() ].activeinv >= 0)
        SetCursorMode(4);
    } 
    else if (button == 6)    // save game
      GUIOn (SAVEDIALOG);
      //SaveGameDialog();
    else if (button == 7)   // load game
      GUIOn (LOADDIALOG);
      //RestoreGameDialog();
    else if (button == 8)   // quit
      GUIOn (QUITDIALOG);
      //QuitGame(1);
    else if (button == 9)    // about
      Display("The Majestic Conspiracy (c) 2005 Tim Hengeveld.");
  }  // end if interface ICONBAR

  if (interface == INVENTORY) {
    // They clicked a button on the Inventory GUI
    
    if (button == 1) {
      // They pressed SELECT, so switch to the Get cursor
      SetCursorMode (MODE_USE);
      // But, override the appearance to look like the arrow
      SetMouseCursor (6);
    }
    
    if (button == 2) {
      // They pressed LOOK, so switch to that mode
      SetActiveInventory(-1);
      SetCursorMode(MODE_LOOK);  
    }
    if (button == 3) {
      // They pressed the OK button, close the GUI
      GUIOff (INVENTORY);
      SetDefaultCursor();
    }

    if ((button == 4) && (game.top_inv_item < game.num_inv_items - game.num_inv_displayed)) {
      // scroll down
      game.top_inv_item = game.top_inv_item + game.items_per_line;
    }
    if ((button == 5) && (game.top_inv_item > 0)){
      // scroll up
      game.top_inv_item = game.top_inv_item - game.items_per_line;
    }  
  }
  
   if (interface == QUITDIALOG) {
     if (button == 0) {
       QuitGame (0);
     }
     if (button == 1) {
       GUIOff (QUITDIALOG);
    }
  }

   if (interface== LOADDIALOG) {                                // if Restore interface
     index=ListBoxSaveGameList(4,0);                                  // Fill List box with saved games
     
     if (button==1) {                                           // if cancel is pressed
      InterfaceOff(4);                                          // Close interface
    }
     else { 
      index=ListBoxGetSelected(4,0);                            // else get the selected game
      RestoreGameSlot(savegameindex[index]);}                   // restore the game
    }

     if (interface== SAVEDIALOG) {                              // if save interface
       SetTextBoxText(5,0,"");                                  // Clear Text box
       index=ListBoxSaveGameList(5,1);                                // Fill List Box with saved games
       index=ListBoxGetNumItems(5,1);                           // Count how many saved games there are          
       if (index>19){                                           // If saved games 20 (maximum)
       Display("You must overwrite a previously saved game.");  // Display warning
    }
  
     if (button==0) {                                 // if enter is pressed 
       index=ListBoxGetNumItems(5,1);                 // Count saved games 
     if (index<20) {                                  // if less than 20
       GetTextBoxText(5,0,text);                      // Get the typed text
       InterfaceOff(5);                               // Close interface
       SaveGameSlot(index+1,text);                    // Save game (text as description)
    }   
     else {                                           // if saved games are 20
       index=ListBoxGetSelected(5,1);                 // Get the selected save game
       GetTextBoxText(5,0,text);                      // Get the typed text
       InterfaceOff(5);                               // Close the interface
       SaveGameSlot(savegameindex[index],text);}      // Overwrite the selected game
    }         

     if (button==2) {
     InterfaceOff(5);                                 // if cancel is pressed close interface
  }
}
}

So instead, I've moved those entries down here, and they seem to work. But aforementioned issues arise. Any idea what the problem might be?
#497
Thank you very much! XIII has always been a favourite comic and game of mine, and I've always wanted to be able to draw as good as Vance (still do). To be even remotely compared to that, is a very big compliment for me. So thanks.

Anyway, thought I'd give you a quick sitrep. I've just gone through hell to get the custom save/load/quit GUI in place, following the GAC tutorial. It isn't entirely accurate, so I have been coding and coding for an hour straight in the twilight and the heat, withstanding hundreds of "missing closing brace" errors(which directed me to somewhere entirely different in the script), to get this &^%!#@$% working. But it does now...I think. So I'm happy. Tired, but happy. Thanks to Gilbot for helping me sort out the last bugs in the script. Whew...

I'm gonna focus on creating several backgrounds in a row now, so it atleast looks like I'm making substantial process. I'll check back soon to show you some new stuff. Watch this space...
#498
AGS Games in Production / Re: Spy Function
Sun 03/07/2005 12:12:38
Quick question: How can the story be done half of a percent, when the game is almost half done?

Sounds like a fun game to me, graphics are looking nice and cartoony.
On that lensflare: I would keep the glow (I like to use 'post-processing effects' in my game too), but I agree on the flare. The glow can work, but if the character walks infront of the window the flare should be blocked and hus disappear, so it's very hard to get that to look good.

Looking forward to seeing more.
#499
Agreed.

If you have a passion for adventure games none of these things should frustrate you too much. Sure, animation can be a bitch, and scripting something isn't always as obvious, but once you get it done it's great. I noticed I really like creating special animations a lot more than walkcycles or whatnot. When I get an idea for a funny little animation I'll go off and do it immediately, while my walkcycles are still laying around. And finding creative ways to solve a scripting problem is (eventually) quite satisfying.

I try to make what I would like to see in an adventure game, so that is almost always fun.
#500
 :o

And why is it that you wanted to use painted backgrounds again? These 3D renders are awesome! (Unless you can draw even better ;)).
SMF spam blocked by CleanTalk