gamemakea
03-11-2008, 02:11 AM
I have it so when i hit space bombs fall, but the gravity i put for bombs2 is being used for the plane(which is what this code is in).
So basically the bombs appear to stay on plane, and than the plane falls, becuase normally the plane doesn't have gravity.
onClipEvent(enterFrame){
if (Key.isDown(Key.SPACE)) {
attachMovie("bombs2", "bombs2", 1, {_x:start_ball_x, _y:start_ball_y});
bombs2.onEnterFrame = function() {
gravity = 0.1;
yspeed += gravity;
_y += yspeed;
}
}
So basically the bombs appear to stay on plane, and than the plane falls, becuase normally the plane doesn't have gravity.
onClipEvent(enterFrame){
if (Key.isDown(Key.SPACE)) {
attachMovie("bombs2", "bombs2", 1, {_x:start_ball_x, _y:start_ball_y});
bombs2.onEnterFrame = function() {
gravity = 0.1;
yspeed += gravity;
_y += yspeed;
}
}