PDA

View Full Version : game



sna]{e
September 26th, 2002, 06:56 AM
i'm making a game (a scrolling shooter one) and would like to know how to make it when you shoot the tree it adds a movieclip from the library, so it appears whereever you shoot it. I really need to know, and nobody answers on other forums, or they ask me a vital question, then i answer and they don't respond. please DONT IGNORE and resond a.s.a.p.

thanks.:rambo:

pom
September 26th, 2002, 07:43 AM
Vital question: what do you mean "when you shoot the tree it adds a movieclip from the library". You mean like a bullet or something?

pom :asian:

dudeman
September 26th, 2002, 11:54 AM
I know what he's talking about. I have the same problem, but without the tree ;)

He's asking how to duplicate a movieclip. We'll call it 'bullethole'.

Every time user presses mouse, 'bullethole' will be attached/duplicated to where ever the mouse pressed down.

There are different ways of doing this, and I found it using a start drag duplicate (don't ask me lol)! It worked, every time you pressed it would drag down to where you shot, worked perfectly.

I lost that because it was saved in the temp directory and got deleted.. and I forgot the code :-\... worked on it for like 2 hrs too!

pom
September 26th, 2002, 12:20 PM
Yeah, I know, but I'm in one of my do-it-yourself moments. I don't want to give out the code :P

So what you have to know about attaching movie: The clip you are attaching must be in the library, and you must give it a linkage name the syntax looks like this
attachMovie("linkageName","newName",depth);
// you access the properties like that
newName._x=200;pom :asian:

flex
September 26th, 2002, 12:50 PM
You can use attachMovie to do it as, ilyas suggested, or try the following fla someone did. Also if you are using it for a "dent" in the tree, make your sure have a different sound played - like a thud - I was going to implement this one of my games - but was to lazy

flex
September 26th, 2002, 12:52 PM
There's another way of doing it - I'll post another fla of another way of doing it. Have to find it...

flex
September 27th, 2002, 12:08 AM
I couldn't find the other file, but I added some code to a fla that I have up on my site. You can download it from my site because it's too big to put up here, and I can't post a link because I use a php script for my downloads.

http://flex.funkyolive.com

Look under ammo system.

flex
September 27th, 2002, 02:30 AM
View it here

http://flex.funkyolive.com/test/tutorial2holes.html

pom
September 27th, 2002, 06:13 AM
Is that a new tute you're working on? Looks cool. And did you bug Kirupa like I told you to? Anyway, I think I'll create a thread where the users can put what tutorials they're working on and all.

Oh, and I've just bought Jobe Makar's Flash MX Game Design Demystified!!! So much cool stuff in there...

pom :asian:

flex
September 27th, 2002, 06:21 AM
Thanks. It was an addition to the first tutorial I did. I haven't bugged him more yet! The first one was basic shooting. I didn't do any more because I didn't get a response from Kirupa. I want to get Flash Games Studio by Friends of Ed - but I don't know if there's a second edition for MX.

pom
September 27th, 2002, 07:34 AM
I posted a tread for that purpose in the tutorial section. Don't give up!http://www.orbeat.net/smil/starwars.gif

flex
September 27th, 2002, 10:02 AM
Hehe, thanks Ilyas.