View Full Version : Start a new level and continue palying the game

01-13-2002, 04:16 AM
Hi ppl, I am designing this game and got so problem and wanna listen to some views.

A hospital staff within a certain time, has to collect all the drugs from different location and bring it to as customer. All the drugs location is known when the game start and so the staff has to plan his path.

Able to start game and collect drugs for the first customer, but after that, I don't know how to generate another customer customer and drugs. I had a fuction that is used to create the drugs. But the problem is that the number of customer is determine by the level (eg. Level 1 -> 1 customer, Level 5 -> 5 customer). So basically is that I don't know how to generate the number of customer according to the level and when to stop and start another new level (how to get rid of the things from the level before). Thz for reading.

01-13-2002, 05:24 AM
I assume your objects (drugs) are being duplicated or attached to the satge using FLahs' built in methods. The best idea w*oul dbe to name them sequentially: drug1, drug2, etc. as instance names, then keep ac ount of the total number. Then at the end of the game you can use a scripted loop (see the tutorial) and removeMovieClip() to remove the drugs. Then all you need to do is incriment the level variable. Once the user collects all the drugs you incriment a variable (which starts at 0) and if it is equal to the level number oyu know they've satisfied all the customers. So then you set the counter back to zero and increiment the level.