I would like to know, how to make a question screen. FE: There is a question and then I want screen to appear. Into this screen player have to write exact word to answer the question.
Thanks.
From the manual:
InputBox
InputBox (string prompt, string buffer)
This function allows your script to read a string typed in by the user. When this function is called it pops up a window asking the user to type in a string, with PROMPT as the text in the window. What they type in will be copied into BUFFER.
Note that this function only allows small strings (about 20 characters) due to the size of the input box it uses.
Example:
string name;
InputBox("What is your name?", name);
will prompt the user for his name and store in in the string name.
For a start?
Thats handy, thank you.
Now I know how to do this, but what should I do if I want to start some animation or something like that when player replies YES and another one when he replies NO.
2. How should I compose music? I cannot find any useful program on the net.
Thanky...
As for music:
Try the freeware MIDI sequencer Jazz++ on www.jazzware.com.
1: Try something like that:
Using TKs code...
If name=="yes" // for name you can of course use answer instead
{your code for the animation} // f.e. AnimateCharcter(...); see help index.
Same for other answers
If name=="no"
{your code}
If name=="" // anything that is neither "yes" nor "no"
{your code ask player again , or so}
i think an if else statement would work better.
I did this:
// script for room: First time player enters screen
string name;
InputBox("Do you do?", name);
if( name=="yes" )
{
QuitGame (0);
}
if( name=="no" )
{
NewRoom (2);
}
Not working in the game. Just the screen asking me : Do you do? and then (when I answer) nothing happened.
ImputBox("Do you do?", name);
if (StrCaseComp("yes", name) == 0) { // in case the player types "Yes", "YeS" or "YES", it detect's it as "yes", see the StrCaseComp in teh manual for info on it
QuitGame();
} else { // if answered anything else than "yes", runs this script
NewRoom(2);
}