Francis wrote
Ive looked in the quest help but i still don't understand what flags do.
They don't really 'do' anything, they are just provided for your convenience when writing code.
An example might help explain that.
Assume that in a game the player has to get a camera, a roll of film and some batteries and then put the film and batteries in the camera before he can take pictures...
To have a nice convenient way to check later that he's ready to shoot pictures, as the player puts batteries in the camera you might check if the camera already has film (and vice-versa of course) and if so set a flag called 'Camera _Ready'...
Now when the player types 'take picture' rather than have to check the player has the camera AND the camera has film in it AND the camera has batteries in it - you just have to check the 'Camera_Ready' flag.
Neater and more convenient.
So, flags are just there to provide a handy way to keep track of things happening in the game, you use them for whatever you want. FWIW you can use a simple numeric variable to do this equally well, but flags are a little more elegant for storing information for tests that require a simple 'yes/no (a.k.a. 'true/false') result.
Further example:
You might additionally use a variable called "shots_left" to store (in the scenario above) how many shots are left on the roll of film. This information isn't the sort of thing a flag would be able to directly hold.
However when the 'shots_left' variable hits 0 you can turn off the "Camera_Ready" flag - so now the one test of the flag 'Camera_Ready' will (if it is true/yes) mean:
a: the camera has batteries
b: the camera has film in it
c: the film isn't used up.
Hopefully the above demonstrates the purpose and utility of flags. If it would help I can build an example showing the above fairly quickly, just ask.
Al (MaDbRiT)