Adventure Game Studio

AGS Support => Advanced Technical Forum => Topic started by: Gold Dragon on Thu 23/10/2003 19:00:07

Title: Text fade in/out, typed Text, and scrolling text
Post by: Gold Dragon on Thu 23/10/2003 19:00:07
Hey do you guys know any way to make desplayed text or diolog text for that matter fade in the screen and fade out... this would be really cool feature for intros I would think

also is there a way to make it look like text is being typed across the screen?  this would be good for when characters are speaking.

and is there a way to make text scroll upwords for credits and intos?
Title: Re:Text fade in/out, typed Text, and scrolling text
Post by: Ishmael on Thu 23/10/2003 19:09:07
the first one can be done, for example, using while's, SetGUITransparecy() and SetLabelText in conjunction with a bg-transparent GUI.

The type in can also be done... with GUI labels and SetLabelText() (this might turn out as a big load of code)

and the third can be done with AJA's agsCreditz plugin.
Title: Re:Text fade in/out, typed Text, and scrolling text
Post by: Gold Dragon on Thu 23/10/2003 19:43:17
Great!!!! ;D ;D ;D ;D

one problem... don't know those functions yet or have a clue of how to put all that together? Plus how do you make a GUI

also where can I get that plugin?
Title: Re:Text fade in/out, typed Text, and scrolling text
Post by: Ishmael on Thu 23/10/2003 20:25:46
Read on the manual about the functions... I'll see if I can get an example script done. GUIs are made in the GUI editor in AGS, and the plugin is theaded somewhere in this (Techical) forum I believe.

----- EDIT -----

Yes, it was, buried deep, but I found it:
http://www.agsforums.com/yabb/index.php?board=2;action=display;threadid=4286
Title: Re:Text fade in/out, typed Text, and scrolling text
Post by: Proskrito on Thu 23/10/2003 22:18:35
You could use something like that for 'typing' text in a label, but this would be blocking:


function SetLabelTypingText(int gui, int object, string message){
int lenght=StrLen(message);
int delay=10; // the delay between typed characters, 10=approx. 1/4 sec.
int counter=0;
char charac;
string buffer;
StrCopy(buffer,"");
while (counter<=lenght-1){
charac=StrGetCharAt(message, counter);
StrCat(buffer,"x");
StrSetCharAt(buffer,counter,charac);
SetLabelText(gui,object,buffer);
Wait(delay);
counter++;
}
}


Not very suitable for characters speech  :-\, but anyway, hope it helps  :).
Title: Re:Text fade in/out, typed Text, and scrolling text
Post by: Ishmael on Fri 24/10/2003 09:53:54
Unless using a custom speech window. like the sierra style.