How do I force a screen update?

You must understand the Game Editor concepts, before post here.

How do I force a screen update?

Postby MrScience101 » Wed Dec 26, 2007 5:24 pm

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
User avatar
MrScience101
 
Posts: 115
Joined: Tue Mar 20, 2007 9:52 pm
Score: 13 Give a positive score

Re: How do I force a screen update?

Postby makslane » Wed Dec 26, 2007 5:57 pm

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)"
Game Editor is an open source game creator software that's wants to pay it's developers to keep evolving.
If you like Game Editor, make a review!
makslane
Site Admin
 
Posts: 3947
Joined: Sat Apr 05, 2003 6:47 pm
Score: 182 Give a positive score

Re: How do I force a screen update?

Postby MrScience101 » Wed Dec 26, 2007 10:03 pm

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
User avatar
MrScience101
 
Posts: 115
Joined: Tue Mar 20, 2007 9:52 pm
Score: 13 Give a positive score

Re: How do I force a screen update?

Postby makslane » Thu Dec 27, 2007 1:41 am

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....
Game Editor is an open source game creator software that's wants to pay it's developers to keep evolving.
If you like Game Editor, make a review!
makslane
Site Admin
 
Posts: 3947
Joined: Sat Apr 05, 2003 6:47 pm
Score: 182 Give a positive score


Return to Advanced Topics

Who is online

Users browsing this forum: No registered users and 1 guest