sprite follow target after touch

0 favourites
  • 5 posts
From the Asset Store
Aim carefully a shoot the ball at the target to earn scores!
  • Hi Community,

    I've tried a few things and not able to get the results i want.

    This is what i'm trying to achieve:

    player static

    tap screen (some distance away from player)

    the tap creates a target sprite

    player move to target (whilst spinning)

    player stops spinning once reached target

    I can achieve this (without the spinning using a bullet) but if I add rotate... it's just not what I want

    I also don't want the player sprite to set angle.

    Any ideas?

    Thanks,

    Roberto

  • Sounds like an easy thing to do.

    1) Create a GLOBAL VARIABLE called SPIN_ON = 0

    2) Create an even SYSTEM every Tick or SYSTEM every X seconds

    Add a 2nd condition: SPIN_ON = 1

    --------- ACTION = Spin player (graphics)

    3) Create an invisible sprite which will be the real player. PIN on this the graphics of the player with Position only (because you said you don't want his angle to change).

    4) When someone taps

    --------- SYSTEM set SPIN_ON to 1.

    --------- Move the invisible sprite to the tap coordinates.

    --------- upon arrival SPIN_ON back to 0.

    Good luck.

  • Awesome!!!! I didn't think of it like that.... now it works exact how I wanted it too

    Thanks DolyGamesCosmos.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Awesome!!!! I didn't think of it like that.... now it works exact how I wanted it too

    Thanks DolyGamesCosmos.

    My pleasure

  • how to make player follow finger with touch ??

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