| Home | Tutorials | Forums | Articles | Blogs | Movies | Library | Employment | Press | Buy templates |
|
|
#1 |
|
Registered User
Join Date: Dec 2001
Posts: 11
|
Hi ppl, I am designing this game and got so problem and wanna listen to some views.
Story ------ 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. Problem --------- 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. |
|
|
|
|
|
#2 |
|
Administrator
Join Date: Nov 2000
Location: Australia
Posts: 8,612
|
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.
__________________
Cheers Jesse Stratford ActionScript.org Cofounder Email: presented in this way to stop spam-bots: My email is composed of my first name (jesse) followed by my last name (stratford) followed by @ followed by actionscript.org Please don't email or PM me Flash questions, that's what the Forums are for! ![]() Please don't rely on me reading my PMs either. Email me about important stuff. |
|
|
|
|
|
|
![]() |
| Thread Tools | |
| Display Modes | Rate This Thread |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| flash game, complex questions :( | rabsterb | Gaming and Game Development | 2 | 06-17-2001 11:05 AM |