A Flash Developer Resource Site

Results 1 to 2 of 2

Thread: SubHunt

  1. #1
    Arem
    Join Date
    Oct 2002
    Location
    Inside your computer....
    Posts
    47

    SubHunt

    Hey guy,

    In case you couldn't tell from my subject, I'm making a game called SubHunt. For those of you who have never heard of the Palm game called subhunt, it's basiclly a game where you try and blow up subs beneath the water. I'm doing a good job, I've even figured out how to make the ship move! But I've run into a problem. I need to make a bomb fall from the bottom of the boat.I made a child movie that has a bomb fall from the top of the screen to the bottom of the screen. Then I made a key command so when you hit the space bar, it goes to a script that says to get the x position of the boat and set it as a variable, the assigns the x position of the boat to the x position of the bomb. Then i say show then play. Everything works EXCEPT the play. HHHHHHHHHHHHHHHHEEEEEEEEEEEEEEEEEELLLLLLLLLLLLLLLL LLLLPPPPPPPPPPPPPP!

    Dan

  2. #2
    Senior Member
    Join Date
    Mar 2003
    Posts
    136
    Why use the play command at all?

    Set the bomb position off screen
    child.bomb.position.x=-100
    child.bomb.position.y=-100
    child.bomb.velocity.y=0

    When you want the bomb to drop

    set child.bomb.position.x = boat.x
    set child.bomb.position.y = boat.y
    set child.bomb.velocity.y = 50


    where child is the dotted name of the child movie as for example

    child = element("bombmovie")

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  




Click Here to Expand Forum to Full Width

HTML5 Development Center