Autor Tema: On key release, find specs of game, how old os's can run?  (Leído 35 veces)

hoanghuynh

  • Newbie
  • *
  • Mensajes: 1
  • Karma: 0
On key release, find specs of game, how old os's can run?
« en: Enero 11, 2018, 08:11:47 am »
How would I do a key release function?
Código: [Seleccionar]
//rename the current level
    if(key(_r))
        if(rename_pressed!=true)
            //Draw the dialog box
                drawing_color(dialog_box);
                drawing_z(-1);
                draw_box(70,60,250,85);
            //Draw the text on the dialog box
                text_z = -5; //this way its above the dialog box
                write(0,80,70,0,"NAME: ");
                write(0,80,90,0,"*rename the current level");
                //Type in the name
                temp_string = textinput();
            //level.filename is textinput()
                level.filename=temp_string;
                say("level.filename has been renamed to: "+level.filename);
        end
        rename_pressed = true;
    else
        rename_pressed = false;
    end
Works when I press r, but it always types r as well. So I figure I can easily fix this by making it an on-release command. How could I make it so that this will work when I RELEASE the R key?

2. How would I find the specs for a game made in bennu?

3. How old of operating systems can run these games? Windows 3.1, Mac OS 9, Linux from the early 2000's, etc.?

Thanks

Arcontus

  • Full Member
  • ***
  • Mensajes: 193
  • Karma: 6
Re:On key release, find specs of game, how old os's can run?
« Respuesta #1 en: Enero 11, 2018, 09:50:54 am »
Hi hoanghuynh,

For your first question, my strategy is use while loop after use the key detector in this way:
Código: [Seleccionar]
if (key(_a))
  while(key(_a)
     FRAME;
  END
  //whatever that you want to do...
END

About your second question, if you are reffering about your game specs it will depends on the kind of things that you do. But in my opinion, is better a good CPU instead of a good VGA for run bennu games.

And about your last question, I don't know the answer.

Regards!