Can I change the value of a text actor dependant on...
Posted: Thu Jan 05, 2006 8:09 pm
Hi.
I've got a problem. I've got this cool game I'm working on, but I need it so that at the end, on the appropriate "Game Over" screen, it says a different thing dependant on the Score and Level the player reached. These are determined by the numerical values of "score" and "levelno", respectively.
To sum it up, I want the value of a text actor to change when the "score" or "level" reaches a certain value. But this actor (which I have named "code") is not a number. How can I do this?
I have tried the following code, but it doesn't seem to work, so I need to know if there is another way. Thanks!
I've got a problem. I've got this cool game I'm working on, but I need it so that at the end, on the appropriate "Game Over" screen, it says a different thing dependant on the Score and Level the player reached. These are determined by the numerical values of "score" and "levelno", respectively.
To sum it up, I want the value of a text actor to change when the "score" or "level" reaches a certain value. But this actor (which I have named "code") is not a number. How can I do this?
I have tried the following code, but it doesn't seem to work, so I need to know if there is another way. Thanks!
- Code: Select all
if(levelno.textNumber > 2 && score.textNumber > 2119)
{
code.text == "COMPLETION CODE";
}
else if(levelno.textNumber < 2)
{
code.text == "EXAMPLE TEXT 1";
}
else if(levelno.textNumber == 2)
{
code.text == "EXAMPLE TEXT 2";
}
else if(levelno.textNumber > 2 && score.textNumber < 2120)
{
code.text == "EXAMPLE TEXT 3";
}
else
code.text == "";