|
|
Re: Text Dialog
[Re: vlau]
#111301
02/07/07 17:03
02/07/07 17:03
|
Joined: Jun 2006
Posts: 2,640 Earth
Germanunkol
Expert
|
Expert
Joined: Jun 2006
Posts: 2,640
Earth
|
Not tested, tell me if something doesn't work. I'm not sure about the string = string; instructions... that's given me errors before. If it does, I think it means the strings need to be defined in different ways (without the [number] etc) try it... Code:
font standard_font = "Courier New",3,18; string display_string[3];
text display_text { layer = 10; pos_x = 10; pos_y = 10; string = display_string; font = standard_font; }
function show_letters(the_string) { string take_apart_string; take_apart_string = the_string; string temp_string; display_text.visible = on; var intcount; while(intcount < len(the_string)) //go through the string { temp_string = take_apart_string; str_trunc(temp_string,len(temp_string)-1); //take out the first letter only. display_string = temp_string; str_clip(take_apart_strin,1); //take the first letter out of the string, and leave the rest. sleep(2); } display_text.visible = off; }
function main() { //... show_letters("letter by letter..."); }
~"I never let school interfere with my education"~ -Mark Twain
|
|
|
Re: Text Dialog
[Re: Germanunkol]
#111302
04/28/07 04:31
04/28/07 04:31
|
Joined: Jul 2006
Posts: 91 Florida, USA
Knuckles
Junior Member
|
Junior Member
Joined: Jul 2006
Posts: 91
Florida, USA
|
Quote:
Not tested, tell me if something doesn't work. I'm not sure about the string = string; instructions... that's given me errors before. If it does, I think it means the strings need to be defined in different ways (without the [number] etc) try it... 
Code:
font standard_font = "Courier New",3,18; string display_string[3];
text display_text { layer = 10; pos_x = 10; pos_y = 10; string = display_string; font = standard_font; }
function show_letters(the_string) { string take_apart_string; take_apart_string = the_string; string temp_string; display_text.visible = on; var intcount; while(intcount < len(the_string)) //go through the string { temp_string = take_apart_string; str_trunc(temp_string,len(temp_string)-1); //take out the first letter only. display_string = temp_string; str_clip(take_apart_strin,1); //take the first letter out of the string, and leave the rest. sleep(2); } display_text.visible = off; }
function main() { //... show_letters("letter by letter..."); }
Weird, I get errors with these lines:
string take_apart_string; take_apart_string = the_string; string temp_string;
Why does it keep saying parameter unknown? I tried defining them inside and outside the function, but it keeps coming up with the same error. I would think it wouldn't do that since it's all being defined as strings anyway. Here's the screen:

Last edited by Knuckles; 04/28/07 04:32.
|
|
|
|