Adventure Game Studio

AGS Support => Advanced Technical Forum => Topic started by: Isegrim on Sun 30/11/2003 22:13:35

Title: RawDraw and RawRestore in a repeatedly execute function
Post by: Isegrim on Sun 30/11/2003 22:13:35
Hi,

I'm trying to make a small action sequence (jousting, actually), where the player has to aim a lance.
In a 'repeatedly execute' function, the position of the lance point is calculated according to the mouse coordinates, then a circle is RawDrawn at the point and a line from the lower right screen corner to the point. Works fine, so far.
The problem is, that I want to call a RawRestoreScreen() at the end of the function. Without a Wait() before, the screen stays blank(everything seems to be removed in the same instant it is drawn), with the Wait(), the screen flickers horribly.
Is there a way around that?

Title: Re:RawDraw and RawRestore in a repeatedly execute function
Post by: Pumaman on Sun 30/11/2003 22:43:35
Normal practice would be to do the RawRestoreScreen before you draw the circle on, but I'm not quite sure how you're trying to use it.

Make sure you did a RawSaveScreen when the background was as you wanted it, rather than when it was blank.

Perhaps you could post a bit of the script?
Title: Re:RawDraw and RawRestore in a repeatedly execute function
Post by: Isegrim on Sun 30/11/2003 22:51:34
Arr... I put the Restore command before the Draw commands and it worked nicely.

I would have never got the idea of restoring before drawing on my own!
Thanks a lot!