Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

unload attached clip 2

Status
Not open for further replies.

dhere38

Programmer
Sep 12, 2000
20
US
Hi all, I am recreating Asteroids. Got my Torpedo to attach to the ship and fire but now I can't seem to get it to unload after is has been fired. Tried to "unloadmovieclip" but all that does is unload the entire movie (my guess is that the attachmovieclip loads to the same level). I need to use the attachmovieclip in order for the torpedo to follow the ship and take on the properties of the ship. Simply loading the movie (torpedo)doesn't allow it to follow the ship even if I put the same script onto the torpedo as is on the ship (Cos, Sin math-functions) it doesn't follow the ship closely enough. Any ideas. Thanks
 
Firstly, when you use attachmovieclip you specify which level it goes to, it's not automatic.

Secondly, call me olddavdesign but can you remind me what asteroids is? Is it the one where the spaceship stays central and rotates, thrusts etc (but always staying in the middle of the screen)?

Sounds interesting!

dave dave@davdesign.co.uk

^^^^^^^^^^^^^^^^
 
Hey Dave!
Just came back from town with "your" book!

Cons... Cost $100.00cdn!
Pros... Got 5 Air Miles with the buy!
I'm closer to Scotland than you may think!
When should I visit?
Is it as rainy as in England?

Guess I'll be off the forum for a while... A lot of reading to do! Huge book!

B-) "Who's that guy with the shades... What's he trying to prove!”

 
Huge book but nice, eh? See you in a few moons!!

There's no rain here, just snow, and lots of it!!! dave@davdesign.co.uk

^^^^^^^^^^^^^^^^
 
Hey Dave, thanks for responding. you are right about the Way Asteroids works. The same game you were describing.
I believe that I tried to load to a particular level but there is a distinct possiblity I did it wrong. could you help me with where to specify the level in the attachmovieclip script. thanks again. Are you or Oldnewbie Scottish? if so God love ya both, I'm a Douglass
 
Superb! What a fantastic project!

OK, I might have guessed the game (ahhh memories! :), but I still need a bit more info to get my head round it.

You say the torpedo follows the ship, by this do you mean that it rotates with the ship?
And fires in the angle it is pointing at the time of firing?
And your using collision detection to detect a hit?
I take it the asteroids are randomized for direction AND scale?
I take it the asteroids are duplications of one asteroid mc, thus having distinct levels for each asteroid?

Simple yes and no will help me. But you might not get a response till tomorrow night unless someone else dives in before then (Old?).

I'm the haggis-hunter, Old is Montrealian, Montrealan, Mont....French-Canadian!

dave dave@davdesign.co.uk

^^^^^^^^^^^^^^^^
 
Montrealer!

Sorry, but games are way past my scope! I'm too old!

B-) "Who's that guy with the shades... What's he trying to prove!”

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top