|
|
|
#1 |
|
Senior Member
Join Date: Aug 2004
Location: I live on this webpage...
Posts: 772
|
Random Shots
I have these airplanes that are attached to the screen on using attachMovie("aircraft", "aircraft" + p, p);
you get the picture. They fly across the screen from right to left with a random speed and y position. What I am trying to randomly get bombs to drop from the planes. Right now all I have been able to do is randomly drop bombs from the corner of the screen. Does anyone know of a good way to do this? I'm open to any suggestion.
__________________
"If I have seen further it is by standing on the shoulders of giants." Isaac Newton ------------------------------------------------------------------------------ OneDayGamer-Looking to sponsor games? |
|
|
|
|
|
#2 |
|
Impressive Click
Join Date: Oct 2004
Location: USA
Posts: 468
|
why don't you attach the random code to the airplane. Then set the x and y position to that of the plane at the time.
|
|
|
|
|
|
#3 |
|
Senior Member
Join Date: Aug 2000
Location: Cairns / Australia
Posts: 366
|
or simply get the _x of the plane dropping the bomb and use it as the starting point for the bomb when you attach it...
__________________
|
|
|
|
|
|
#4 |
|
Senior Member
Join Date: Jul 2003
Location: Canada
Posts: 1,366
|
This might help, if its what you want...
I think that should all work, if you need any clarfication just ask! Hope that Helps! Edit:Code Change Last edited by UnknownGuy; 02-23-2005 at 08:43 AM. |
|
|
|
|
|
#5 |
|
Senior Member
Join Date: Aug 2004
Location: I live on this webpage...
Posts: 772
|
I think I might work with the code you gave me unknownguy. Where you say use this when you movie loads and stuff, does this code all go on the same frame? Does it go on a frame or a movieclip? Also in your code you switched from aircraft to plane. Did you mean to? Also where does P get increased? Should I put these things in functions?
__________________
"If I have seen further it is by standing on the shoulders of giants." Isaac Newton ------------------------------------------------------------------------------ OneDayGamer-Looking to sponsor games? Last edited by TheLostGuru; 02-23-2005 at 12:32 AM. |
|
|
|
|
|
#6 |
|
Senior Member
Join Date: Aug 2004
Location: I live on this webpage...
Posts: 772
|
Alright, I give in... I really didn't want to end up posting my fla, but I'm sick of this bomb not dropping. My bomb dropping code is in my aircraft mc. Any help would be appreciated.
__________________
"If I have seen further it is by standing on the shoulders of giants." Isaac Newton ------------------------------------------------------------------------------ OneDayGamer-Looking to sponsor games? |
|
|
|
|
|
#7 |
|
Senior Member
Join Date: Aug 2004
Location: I live on this webpage...
Posts: 772
|
fla
__________________
"If I have seen further it is by standing on the shoulders of giants." Isaac Newton ------------------------------------------------------------------------------ OneDayGamer-Looking to sponsor games? |
|
|
|
|
|
#8 |
|
Senior Member
Join Date: Jul 2003
Location: Canada
Posts: 1,366
|
When I say when the movie loads I mean, it should just be executed once, while the next piece of code should be done when you create the fighter, and the last everyframe. It dooesn't matter if its in a frame or a movieclip(you might have to use root to get out of the movie).
And no, its doesn't matter I switched from aircraft to plane, plane is a variable and holds data like aircraft1, aircraft2 etc... I forgot to increase p, so I've edited the code so it does. I don't have time to look at the .fla, but hopefully I will tonight. Hopefully that clarifies a few things... |
|
|
|
![]() |
|
||||||
| Thread Tools | Search this Thread |
| Display Modes | |
|
|