textNumber is an actor variable (so each actor has its own). They are only used/useful with text actors. You can treat the textNumber itself as a double. If the actor does not have any text, setting the textNumber will display the variable. It is generally a good idea not to treat the textNumber as a variable, but purely as a display technique. That is to say, don't do this.
- Code: Select all
actor.textNumber+=5;
Instead make a variable such as score and do this.
- Code: Select all
score+=5;
text_actor -> Draw Actor -> Script Editor
- Code: Select all
textNumber=score;
gameEditor has some problems with handling textNumber and it is just safer to use it like that.