Adventure Game Studio

AGS Support => Beginners' Technical Questions => Topic started by: on Sat 21/04/2007 20:15:35

Title: Wipe a Window??
Post by: on Sat 21/04/2007 20:15:35
Is there a way of clicking on a window, that takes you to a screen so that you have to use your cloth to wipe it clean?

Title: Re: Wipe a Window??
Post by: Dan_N on Sat 21/04/2007 20:46:34
Well, you can make a GUI button and then put in it's script cEgo.ChangeRoom(RoomX,X,Y) but I have no ideea how to solve that wiping thing o.O
Title: Re: Wipe a Window??
Post by: SupSuper on Sat 21/04/2007 21:38:45
You could have a "window" room with a lot of hotspots that the player has to drag over to "clean", and then check when all the hotspots are "clean".
Title: Re: Wipe a Window??
Post by: on Sat 21/04/2007 21:51:12
Quote from: SupSuper on Sat 21/04/2007 21:38:45
You could have a "window" room with a lot of hotspots that the player has to drag over to "clean", and then check when all the hotspots are "clean".

I think i will do that unless someone else comes up with an Idea.
Title: Re: Wipe a Window??
Post by: Mr Flibble on Sat 21/04/2007 21:56:53
Do the rawdraw functions have support for filling the screen and then removing, for instance, circles around the mouse? I know you can could rawdraw a circle but can you rawdraw an.. uncircle, maybe?
Title: Re: Wipe a Window??
Post by: SupSuper on Sat 21/04/2007 22:21:40
Quote from: Mr Flibble on Sat 21/04/2007 21:56:53
Do the rawdraw functions have support for filling the screen and then removing, for instance, circles around the mouse? I know you can could rawdraw a circle but can you rawdraw an.. uncircle, maybe?
You could always use a "fixed color window" and RawDraw with the window's color, but you'd still need a way to detect if the player has "RawDrawed all over the window", thus my suggestion for hotspots.
Title: Re: Wipe a Window??
Post by: Dan_N on Sun 22/04/2007 00:00:54
Either way, this would be a nightmare to code...
Title: Re: Wipe a Window??
Post by: CodeJunkie on Sun 22/04/2007 00:26:52
Perhaps imagine the window as a grid of squares (or rectangles) and make a 2d matrix for the cleanliness of each part of the window.  Have a section in repeatedly_execute to see where the mouse is moving and what matrix position it is in to update the matrix.  Make particularly dirty areas into objects that change graphic as the window is cleaned.  The window is cleaned when, for example, the matrix contains all 0's.