So I've seen some very good examples of what I want to do in other games, shame I cannot remember ANY of them, heh. But yes, I'm wanting to have the text in my game be displayed in the textbox letter by letter if you know what I mean. Think Zelda 3. How it kinds scrolls along for you then stops at the end and waits for you to continue. Anyone know what I mean? I'm trying to do this for my games but I just can't think of a simple way of doing it =/ Any ideas?
Basically you have a string object off screen which contains text (this can be done in game, or loaded externally from a script file of some sort).
I'm not sure about the formula but i think it's something like
set alterable string to string$("display object") + mid$("string object", current character, next character)
so you'd start of at 0,1 then increase them each time (possibly using a counter)
Then when it gets to the end of the string, you could use the string length comparison to the counter value, and if it's equal to the value of the counter then set a flag of an object on.
Basically, when you're getting the text, have this flag off.
I.e
suppose we have
display string (text displayed)
string object (text to read from)
counter
Flag 0 (some object) off:
Display string: set alterable string to string$("display string") + mid$("string object", value("counter"), value("counter") +1)
Add 1 to counter
string length (display string) = string length(string object)
Set flag 0 (some object) on
some button pressed + flag 0 on:
load next paragragh in the script
clear displayed text
set flag 0 off
crude way of doing it, and would take a bit of modifying to end the conversation.
i.e an extra counter, and load a value from an ini to say how many paragraghs are in the conversation.
There are lots of tutorials on doing progressive text, the main problem was on having the text MOVING up out of the text box thus leaving room for new text.
Just make steps that are manageable that require button presses for long text?
I've done this
From memory I used a counter and used Left$("string", #character) then used a display object to load speech into the other one Works nicely. But you need to reset the counter/value when new text is displayed or you get instant appearing.
As I just mentioned, there are lots of good examples and tutorials on progressive text already, the hard part was making the text scroll upwards or downwards or whatever direction, as in Zelda 3 (and most other RPG's as well).
Wow, thanks for all the replys guys! I gotta admit though I'm really confused now though! Even though I've been workign with TFG for years now i suppose you could still call me a n00b really, as I've always played it safe and never really ventured outside of the default platform movement etc... heh. Tutorials may help me out though so please, fire away! =D
It can't be that hard.. Maybe with TGF though as it might not offer proper X and Y movement for all objects. To be honest I cannot remember. I'm at work so I won't start clickin' about this, but I tell you I'm positive there is a way.