dropping bomb, fixed location?

rlehmrlehm Member Posts: 320
edited November -1 in Working with GS (Mac)
I'm having an issue dropping a bomb and having it explode. Here is the issue:

I drop the bomb by interpolating it down into the camera view.. the issue here is, when the player moves left or right, so does the bomb.. as it's falling, it's moving its X with player X (Because its on the layer that is not scrollable)

If I put it on a different layer, it will drop straight, but off the screen.

I want to be able to have my actor control camera, and when the bomb is dropped it will come straight down where it was when the player presses the bomb button,and the explosion happen in front of the bomb.

Thanks for any help

Comments

  • rlehmrlehm Member Posts: 320
    After rereading it makes little sense. I'll try another way of asking.

    I have an actor off screen. I'd like it so that the actor will move to the position of the main actor at the moment 'press' is made. Not move from left to right as my actor moves left to right.

    Basically, botton press, bomb drops to the exact location (or toward) where my actor was when button was 'pressed'

    Thanks for any help, willing to try anything.
  • rlehmrlehm Member Posts: 320
    Bumping. Still stuck. Sorry if the bump annoys you. Just can't sort this out.
  • RedlerTechRedlerTech Member Posts: 1,583
    Try this:

    Create 2 attributes FingerPressX & FingerPressY

    Rule: When touch is released, change game.fingerpressX to game.touchX and change game.fingerpressY to game.touchX

    Rule, when touch is released spawn & interpolate the bomb(s) position to fingerpressX & fingerpressY

    Matt :D

    Try it & tell me if it works.
  • rlehmrlehm Member Posts: 320
    That would drop the bomb where I tap right? I am using a button in the bottom right corner to trigger the bomb, I would like the bomb to go down to the players location when I press the button. But thanks for trying.

    When the player moves, I'd like the bomb to still travel to his location when I pressed, and not follow him.
  • iTouchGameriTouchGamer Member Posts: 681
    Couldn't you constrain the position of the bomb off-screen, to the position of the player? Then when you touch the button, it drops the bomb...
  • rlehmrlehm Member Posts: 320
    Ithouch, that's the way it is now. But when my player is running the bomb moves with him as dropped, and the explosion moves along too. Looks odd.
  • RedlerTechRedlerTech Member Posts: 1,583
    iTouchGamer said:
    Couldn't you constrain the position of the bomb off-screen, to the position of the player? Then when you touch the button, it drops the bomb...

    This gives me an idea, keep the bomb off screen, and constrain it to the X position of the player (or touch; try both), then when touch is pressed to interpolate the Y position
  • iTouchGameriTouchGamer Member Posts: 681
    NextGen said:
    This gives me an idea, keep the bomb off screen, and constrain it to the X position of the player (or touch; try both), then when touch is pressed to interpolate the Y position

    That's exactly what I just said, you just worded it different.
  • rlehmrlehm Member Posts: 320
    Nextgen, this is exactly how it is setup right now. When player moves x, bomb x moves. Looks weird.
Sign In or Register to comment.