How do I Set my spaceship to follow on direction to anywhere I touch on the screen?

0 favourites
  • 11 posts
From the Asset Store
Rotate & Animation for 16 Direction & Mouse Direction
  • Hello everyone.

    I'm building a top down space shooter game in Construct 2, and I want to navigate my ship by touching anywhere on the screen. Gameplay orientation: Portrait.

    Thanks

  • Hello , i dont know if construct 2 have the "Move to" behavior, if yes this is perfect for this.

  • You right, but how can I made this behaviour in Construct 2?

  • here is a really quick test...

    it give the ship Bullet behavior, and sets the speed based on the distance to the place you touch. And updates the speed every tick so it slows down as it gets there. And sets the angle of the ship to the target coordinates.

    https://rieperts.com/games/forum/SpaceshipToTarget.capx

  • here is a really quick test...

    it give the ship Bullet behavior, and sets the speed based on the distance to the place you touch. And updates the speed every tick so it slows down as it gets there. And sets the angle of the ship to the target coordinates.

    https://rieperts.com/games/forum/SpaceshipToTarget.capx

    Thanks for the help, unfortunately that is not what I'm after.

    Best example of touch controls I'm looking for can be found in this game: Sky Force Reloaded

    play.google.com/store/apps/details

  • have you looked at the Space Blaster demo game? it uses touch and pretty much moves like the game you linked to as far as I can tell. Space Blaster seems a little slower but it isn't hard to change the ship's speed.

  • have you looked at the Space Blaster demo game? it uses touch and pretty much moves like the game you linked to as far as I can tell. Space Blaster seems a little slower but it isn't hard to change the ship's speed.

    This is close. Thanks

    I have uploaded video from that game. Now you will see what I mean ;)

    youtu.be/Vc4BvvqKmlI

  • that does help a lot... I watched some gameplay on youtube, but couldn't see how the movement related to the player's finger.

    the space blaster demo requires that you keep your finger right over the ship. The relative movement makes it a lot easier to see what is going on. I don't have time right now, but I might take a closer look later tonight and see what I come up with.

  • That will be much appreciated!

    Thanks

  • ok, I had a lot of fun playing around with that! :)

    I tried copying several parts of what I saw in the video...

    I was going to add comments explaining what is going on but ran out of time. There is a camera sprite that has scrollTo and bullet behavior that makes the screen scroll. The layout has unbounded scrolling so it can go forever. Then I move the backgound images back up to the top when they move off the bottom.

    https://www.rieperts.com/games/forum/SkyForce.capx

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • ok, I had a lot of fun playing around with that! :)

    I tried copying several parts of what I saw in the video...

    I was going to add comments explaining what is going on but ran out of time. There is a camera sprite that has scrollTo and bullet behavior that makes the screen scroll. The layout has unbounded scrolling so it can go forever. Then I move the backgound images back up to the top when they move off the bottom.

    https://www.rieperts.com/games/forum/SkyForce.capx

    AllanR, you are the star! )

    You did exactly what I was looking for! I see you like to challenge yourself, which is great! )

    Now I will be examining your code, as there is lots of things going on....

    Once again, Thank you so much for your help!

    With regards

    Edgar

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)