Gamestudio Links
Zorro Links
Newest Posts
loading historical data 1st time
by AndrewAMD. 04/14/23 12:54
Trade at bar open
by juanex. 04/13/23 19:43
Bug in Highpass2 filter
by rki. 04/13/23 09:54
Adding Limit Orders For IB
by scatters. 04/11/23 16:16
FisherN
by rki. 04/11/23 08:38
AUM Magazine
Latest Screens
SHADOW (2014)
DEAD TASTE
Tactics of World War I
Hecknex World
Who's Online Now
4 registered members (fogman, Grant, AndrewAMD, juanex), 989 guests, and 8 spiders.
Key: Admin, Global Mod, Mod
Newest Members
rki, FranzIII, indonesiae, The_Judge, storrealba
18919 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
display of text #132537
05/29/07 10:31
05/29/07 10:31
Joined: Apr 2007
Posts: 83
prog Offline OP
Junior Member
prog  Offline OP
Junior Member

Joined: Apr 2007
Posts: 83
I want to display the text(question) on the screen and also accept the answer given by the user and store it. Then display the next question.

Re: display of text [Re: prog] #132538
05/29/07 11:18
05/29/07 11:18
Joined: Mar 2007
Posts: 776
Poor village - Poland ;)
tompo Offline
User
tompo  Offline
User

Joined: Mar 2007
Posts: 776
Poor village - Poland ;)
making dialog with 3dgs is crap... and hard to do... it's more FPS engine than RPG with dialogs...

you may do it in this way...
you have to make panels with invisible buttons with text on it, so when you click the answer you click the button... each button has to be deffierent (different fuction to activate when clicking) depend on what text the button is showing...

about storing answers...
or use vars to do it or play with file_str_write function

look in downloads... there is a soft to make dialogs... but I've never used it

or search for dll to read and write to .ini file with sections


Never say never.
Re: display of text [Re: tompo] #132539
05/30/07 07:01
05/30/07 07:01
Joined: Apr 2007
Posts: 83
prog Offline OP
Junior Member
prog  Offline OP
Junior Member

Joined: Apr 2007
Posts: 83
I want to display the quesions one after the other, i.e.,first display the question and accept the answer, and if it is correct it shud display another question and accept the answer....

but the code below is displaying the first question accepting answer for that and if it is correct it is displaying the 2nd question but it is not accepting the answer(i.e., it is not performing any further actions)
////code////////////////
var data_handle;

string name_str[30];
string name_str1 = "abcd";


text login_txt

{

layer = 10;

pos_x = 200;

pos_y = 275;

string = name_str;

}

starter log_me_in()

{

login_txt.string = "question1";

login_txt.visible = on;

sleep (5); // show the text for 5 seconds

login_txt.string = name_str;

str_cpy(name_str, ""); // reset the string

while (str_cmpi (name_str, "") == 1) // run this loop until the player has typed something

{

inkey (name_str); // store player's input in name_str

if (str_cmpi (name_str, name_str1) == 1)
{
str_cpy(name_str,"question2");

}

wait (1);



}

data_handle = file_open_write("data.txt"); // open (or create and open) this file

file_str_write (data_handle, name_str); // write the name of the player to the file

file_close (data_handle);

}


Moderated by  HeelX, Lukas, rayp, Rei_Ayanami, Superku, Tobias, TWO, VeT 

Gamestudio download | chip programmers | Zorro platform | shop | Data Protection Policy

oP group Germany GmbH | Birkenstr. 25-27 | 63549 Ronneburg / Germany | info (at) opgroup.de

Powered by UBB.threads™ PHP Forum Software 7.7.1