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 - Gilbert

#6301
GeForce? I'm using GeForce2 MX...

Seems that they're suspiciously related, if it's a graphic driver flaw, nothing can be done I think.
#6302
Nope, but all mouse usage were designed by the game maker him(her)self, so you can just don't use any interactions related to mouse usage in your game (and comment out any mouse-related stuff in the script).
#6303
Right, specifically did you read the hiscore back from the file at game start like I told you to?
#6304
Hmmm did you set the size correctly when loading the screenshot?
Like:
spritehandle = LoadSaveSlotScreenshot(slot, 160, 120);
#6305
You may have better luck asking here instead. :P
#6306
The bartender looks... sexy. ;D

Though personally I found him looks more like a butcher than a bartender, but I think that's intentional.
#6307
Advanced Technical Forum / Re: Keycode Problem
Wed 16/06/2004 09:45:13
Did you put it in the on_key_press() function?
#6308
General Discussion / Re: Spy's in the forums?
Wed 16/06/2004 08:43:20
Hah, how can you arrest someone here?
And the spies had actually become a LARGE rebellion group, with their grand central called teh AGS Whiteboard. You shouldn't be touching them, as there're hitmen and ninjas as members!



Well I think this thread is quite senseless, it'll be a honour if someone likes to get rid of it...
#6309
Okay, let's try cracking down the problem.

What you need is:

1. read the hiscore if requested
2. write the score to file if current score is > the hiscore stored in the file.

If you're only going to record the hiscore you just need to write an int variable to the file, if you want to record other info, such as signature, etc., you can also write some string into it.
But, to start simple I'll assume you only read and write one variable (of int type) to the file.

To do 1., first I'll suggest you have a variable holding the hiscore (I'll recommend a variable to hold it in the global script and make it a accessible for rooms using export and import, or just use a GlobalInt, I'll use a normal int variable in this example). So you only need to read the value back when the game is started, so I'll put:
On top of global script:
int hiscore;

In game_start():
int hischandle=FileOpen ("hiscore.dat", FILE_READ);
if (hischandle==0) {// file not exists, create one.
  hiscore=0;
  hischandle=FileOpen ("hiscore.dat", FILE_WRITE);
  FileWriteInt (hischandle, hiscore);
  FileClose(hischandle);
} else { // file exists, read its content into hiscore
  hiscore=FileReadInt(hischandle);
  FileClose(hischandle);
}



To do 2. I don't recommend doing it in a repeatedly execute manner, as it'll utilize file access in every game loop, I'll remmend checking if the score is higher than hiscore when a game's ended (like gameover or completed the game), and overwrites the file if there's a new hi score:
if (score>hiscore) { //if you break the hi score
  hiscore = score;
  int hischandle=FileOpen ("hiscore.dat", FILE_WRITE);
  if (hischandle==0) {// file error
    Display("The Game could not retreive the requested file."); 
 } else { // write to file
    FileWriteInt(hischandle, hiscore);
    FileClose(hischandle);
  }
}



Note that when you want to display/check/etc the current hi score, you can just access the variable hiscore.
#6310
General Discussion / Re: Spy's in the forums?
Wed 16/06/2004 08:08:45
The forums are open to anyone who is sensible enough to pass the registration quiz. There're free talks, free resources, free games, free game engine and maybe free 53>< here!1!

What else can a spy do here, apart from asking what will happen if there's a spy here?


Ah, also, posting 'AGS SUXX!1!', 'Roger SUXX!1!' maybe. :P
#6311
I think they're all possible already, the plugin just send and receive data via network, so all can be handled by scripting (I think).
#6312
Good to hear it's working. No need to lock, just let it rot. ;)
#6313
Quote from: Hollister Man on Wed 16/06/2004 03:42:10
I run in a window because my monitor throws the screen way off to the side in 640 mode. :)
Could you just adjust your monitor's setting for it?
#6314
That's not possible at the moment I think, and if someone played a game under window mode they usually had a reason to, like for example wanted to execute some other programmes alongside the AGS game, so I don't think locking the cursor to one window is a very good idea.

However I know how frustrating that in many AGS games, sometimes you need to click really close to screen edges, which was quite hard in gereral if you play them under window mode. So I think it's the responsibility for those who are making the games to make sure that you won't need to click really close to edges, actually they should have tried it when testing their game.
#6315
Because you SHOULD declare sele as int (you used text for string already), it will hold the position of the selected option (-1 if not selected).
#6316
Quote from: Migs on Tue 15/06/2004 13:47:53
What's wrong with Roger?Ã,  There's nothing wrong with Roger.Ã,  I think we need more games with Roger.
Agreed whole-heartedly.

STFU N00B ER1C!1!
#6317
Just use ListBoxGetSelected (), and please remove/comment out the part enclosed by /* and */ (they'll reset the GUI's status whenever you click something on it, you only need them WHEN YOU ARE LAUNCHING THE GUI.

  if (interface == 5) {
/* remove this portion
    CentreGUI (5);
    GUIOn (5);
      ListBoxSetSelected (5, 4, -1);
*/
      if (button==2) { 
      GUIOff (5);}
      if (button==3) {
        sele = ListBoxGetSelected (5, 4);
        index=ListBoxGetNumItems (5, 4);
        if (index<20) {
          //ListBoxGetItemText (5,4,ListBoxGetSelected(5, 4),sele);
          if (sele==-1){
          GetTextBoxText (5, 1,text);
          GUIOff (5);
          SaveGameSlot (index+1,text);}
        else {
          ListBoxGetItemText (5,4,ListBoxGetSelected(5,4),text);
          GUIOff (5);
          SaveGameSlot(savegameindex[index],text); }
        else {
          index=ListBoxGetSelected (5, 4);
          GetTextBoxText (5, 1,text);
          GUIOff (5);
          SaveGameSlot(savegameindex[index],text); } 
       }

I didn't check much, maybe there're some other problems.
#6318
Since the sprite jam is still in progress, and you didn't win it (yet) to earn the privilege of starting one, I'm locking it.
#6319
Critics' Lounge / Re: Backgrounds
Tue 15/06/2004 05:23:32
M$Pain is certainly one of the crapiest graphic programme in the world, but then using a killer application won't help if your skill doesn't improve.

Actually even using M$Pain alone to create all the graphics is okay, provided you can use it well, for example, I once discovered things like this, and it's drawn completely with M$Pain.
#6320
Quote from: Hollister Man on Wed 09/06/2004 18:19:24
320x2?0 - Hi Color
Was it 320x240 ?
Moreover, can TRUEcolour pics be accepted? As ppl can just draw truecolour pics and then convert them to hi colour afterwards, moreover, saving as JPEG will mean the file would be in truecolour anyways.
SMF spam blocked by CleanTalk