Page 1 of 1

How do I force a screen update?

PostPosted: Wed Dec 26, 2007 5:24 pm
by MrScience101
How do I force the screen to update? For instance, I will update the score variable using the script editor by typing in: score++;
I have verified that the variable contains the new number, but the text actor does not update, so even though score is increasing the user can't see it increasing. How do I force the score actor to be redrawn using the new number?

Much thanks,
MrScience101

Re: How do I force a screen update?

PostPosted: Wed Dec 26, 2007 5:57 pm
by makslane
Look the docs:
http://game-editor.com/docs/scripting.htm

"changing any of the internal Actor's variables (x, y, xscreen, yscreen, ...) has no effect on the Global Code.
To use the special actors creator or parent, put a in the caller Script Editor (like a comment: //creator)"

Re: How do I force a screen update?

PostPosted: Wed Dec 26, 2007 10:03 pm
by MrScience101
Yes I read that. I did not quite understand it though. The biggest confusion is the second line that says: ", put a in the caller Script Editor."
At the risk of sounding really, really, really stupid, I would like to know the following: Put a what in the caller Script Editor?

Thanks for your help.
-MrScience101

Re: How do I force a screen update?

PostPosted: Thu Dec 27, 2007 1:41 am
by makslane
The name of the actor you want to update. If you want to update the enemy actor, use this:

Code: Select all
//enemy
yourGlobalFunction();


I know this is not the good way....