sprite follow target after touch

Get help using Construct 2

Post » Mon Jun 12, 2017 7:38 pm

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
B
5
S
2
Posts: 63
Reputation: 628

Post » Tue Jun 13, 2017 1:09 am

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.
Thank you to Construct 2 for giving me the ability to create games without programming knowledge.
My games & gaming portal = DolyGames
If anyone wants to cooperate to help each other Win-Win please email me - I am always happy to discover new opportunities.
Cheers,
COSMOS
B
21
S
10
G
1
Posts: 79
Reputation: 2,285

Post » Wed Jun 14, 2017 6:12 am

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

Thanks DolyGamesCosmos.
B
5
S
2
Posts: 63
Reputation: 628

Post » Wed Jun 14, 2017 9:53 am

RobertoFreemano wrote:Awesome!!!! I didn't think of it like that.... now it works exact how I wanted it too ;)

Thanks DolyGamesCosmos.


My pleasure ;)
Thank you to Construct 2 for giving me the ability to create games without programming knowledge.
My games & gaming portal = DolyGames
If anyone wants to cooperate to help each other Win-Win please email me - I am always happy to discover new opportunities.
Cheers,
COSMOS
B
21
S
10
G
1
Posts: 79
Reputation: 2,285

Post » Mon Aug 07, 2017 10:49 am

how to make player follow finger with touch ??
B
21
S
12
G
16
Posts: 6
Reputation: 10,184


Return to How do I....?

Who is online

Users browsing this forum: No registered users and 25 guests