Password screen? (SOLVED)

Started by proximity, Mon 04/04/2005 13:29:09

Previous topic - Next topic

proximity

i want to make a computer screen in my game that should initially ask for password and proceed if it's true.how can i make that screen.is it about GUI?i want to start from the begining.please help me to create my screen and rest. i want something like this:
- opening screen ask for password
- next menu with analyzer,encrypter,e-mail,...(like in the gabriel knight 3)
as a result, i want to make exactly computer in the game. Please send me the right script for it
Proximity Entertainment

Ashen

Don't ask for much, do you?

For the password screen you could either use the InputBox() command, or create a GUI with a text box on it, if you want to control the exact look, and use GetTextBoxText().
Then StrComp() or StrCaseComp() to check if the password is right.
For the computer screen, you could either use a room, with hotspots and so on, or a GUI. I've not played GK3 (well, i have, but only the very start), so I don't know what you're aiming for.
It's not really possible to give you the exact scripting needed, without knowing in detail what you want to achieve - especially if it'll involve settign up GUIs.

You might also want to read through the GUI section of the manual, and search the forums, to get a better idea of how to do it yourself.
I know what you're thinking ... Don't think that.

proximity

i tried inputbox and StrComp.but the rusult was nothing. i am typing the password but it goes nothing. is it something like this?

   string input;
   StrCoomp ("password", input);
            { code here }
  i didnt understand this section. i put right password code in {code here }
but i didnt success. i wanted to use textbox function as well.but script didnt accept the commands. if you made a password screen before, can you type what you did?
Proximity Entertainment

Ashen

You need to put your password on the StrComp("password", input) line, where it says "password".
Like, if the password was "ashen", it'd be something like:
Code: ags

string input; // declare string
InputBox("Enter Password:", input); // Ask user for password
if (StrComp ("ashen", input == 0) { // replace ashen with whatever you want
  // If the password was correct.
  // The 'Go to computer screen code would go here.
  // It could be a  NewRoom (x) command, or GUIOn(COMPGUI)
}
else {// if the password was wrong
  Display ("Access Denied!");
}


If you want, PM me with details of what exactly you want, and I'll throw together a template for you later today. It might be easier to show how it works, than to try to explain it.
I know what you're thinking ... Don't think that.

proximity

Hmmm i think i understand that part. did you play 7 Days a Sceptic? there is captain's computer in the game. i want to make computer like that
Proximity Entertainment

Ashen

I did... but it was a while ago.
Excellent! Now I have an excuse to re-play it.
I know what you're thinking ... Don't think that.

proximity

dont you make a game before containing password screen and computer? did you ever make a game? i think you did. because your script knowledge is extreme i think.if you made any game before,i want to play it
Proximity Entertainment

Ashen

No, I've not made a game yet. I just sort of potter about with scripting, picking things up here and there. I have played with passwords and such, but there's so many different ways of doing it, that it might not be of any use.

Anyway, I've had a look a 7DAS, and I'd got the wrong idea in my head about what you wanted - I was thinking of something much more complicated and graphics based. You're probably better ignoring my suggestion about InputBox, as it really doesn't fit, and using a stripped-down version the Text Parser interface. There's a template on this page if you don't know how it works, and you can look in the manual and on the forums for more details.
I know what you're thinking ... Don't think that.

proximity

Thanks Ashen.i just tried your base script you gave me yesterday and it worked:) i tried it in textbox. i really didnt get used to inputbox. because i want things in one screen.
so i used textbox. thanks for your help. i made a game but its language is Turkish.i suppose you dont understand:) if i make English game i will let you know with password screen :D
Proximity Entertainment

SMF spam blocked by CleanTalk