hi guys, i hope i'm posting this in the right place. i'm super new to programming in general and i keep getting stuck on dumb things like this.
i'll just dump the code before anything else (this is pretty much the entire WIntro class):
private var currentID:uint = 0;
private var texts:Array =
[
"hello, traveler.",
"couldn't figure out typewriter text, i see?",
"it's understandable.",
"you'll get there.",
"probably."
]
public function WIntro()
{
super();
}
override public function begin():void
{
Text.font = "PStart";
Text.size = 8;
var introText:Text = new Text(texts[currentID]);
var textEntity:Entity = new Entity(0, 0, introText);
textEntity.x = 32;
textEntity.y = 64;
add(textEntity);
}
override public function update():void
{
super.update();
if (Input.check(Key.ANY))
{
if (currentID != 4)
{
currentID++;
}
else
{
FP.world = new WGame();
}
}
}
basically all i want to do is have the text skip to the next string when a button is pressed. i also wanted to add a typewriter effect, but first things first i guess?