Accelerate To: touch position problem, additional touches alter path

0belisk0belisk PRO Posts: 189
edited November -1 in Working with GS (Mac)
hey guys, having problems getting my bullet paths. when the player shoot, the bullets accelerate towards the touched position, however, if you touch again on the screen, before the previous(s) bullets have gone off screen, they change path immediately to the new touched area.

how do i make it so once the bullets have received their direction/path, that it cant be altered by anything?

http://gamesalad.com/game/42149

heres a link to the game atm incase you dont understand what i mean, fire at one location, then quickly shoot somewhere else and notice how the bullets change direction.

thanks guys

Comments

  • 0belisk0belisk PRO Posts: 189
    bump :)
  • quantumsheepquantumsheep Member Posts: 8,188
    Hey fella - I can solve your problem for you, just not right now as I'm feeling a bit ill and tired - sorry!

    I'll post a response tomorrow sometime - it's a solution that Orbz showed me, so I can't take credit, but it'll do what you're describing.

    Sorry I can't do it now - I just don't feel up to it!

    Cheers,

    QS
  • 0belisk0belisk PRO Posts: 189
    no problem fella, whenever your ready, look forward to your response :)
  • quantumsheepquantumsheep Member Posts: 8,188
    Sorry for the delay - try this out, and let me know if it helps!

    https://files.me.com/qsheep/qdjzjs

    Cheers,

    QS :D
  • quantumsheepquantumsheep Member Posts: 8,188
    Something that included stuff that should not be seen by non-sheepy eyes - but the new version's up now :D
  • 0belisk0belisk PRO Posts: 189
    hey, downloaded the project and examined it, it does indeed work ty :) and now each bullet has its own path that cant be altered by additional touches.

    however it has sparked a new problem. now the bullets arent shooting to the correct area.
    e.g. their supposed to be shooting to where i touch on the screen, but instead their flying off completely to random positions it would seem, some off-screen, some +30'sh pixels off course.

    any idea?

    http://gamesalad.com/game/42149 to see what i mean
  • quantumsheepquantumsheep Member Posts: 8,188
    I honestly can't see why that's happening.

    I imagine it's something to do with stuff you've added. If you put the bullets in and stuff just as I did, it should work...

    So... Not sure! Sorry!

    QS :O
  • 0belisk0belisk PRO Posts: 189
    i think i know why, i went onto your example and changed it from mouse button to touch, and it no longer works. my game is being made for iphones and need to be touch, it looks like this method doesnt work for touch-based actions?
  • scitunesscitunes Member, Sous Chef Posts: 4,047
    0belisk said:
    i think i know why, i went onto your example and changed it from mouse button to touch, and it no longer works. my game is being made for iphones and need to be touch, it looks like this method doesnt work for touch-based actions?

    GS automatically converts mouse to touch. You can leave it as mouse and it will work fine on iOS devices.

    In fact it is helpful to know an important difference. "When touch is pressed" means the actor has been touched within it's own shape (rectangle or circle). "Mouse is down" gets translated for iOS devices as the screen has been touched ANYWHERE.
  • 0belisk0belisk PRO Posts: 189
    ohh right! looks like i really got the wrong end of the stick there. i assumed touch was relating to a physical touch, not as in something touching the actor... thanks for clearing that up guys :)
Sign In or Register to comment.