How do I make a navigation arrow

Just started using Construct 2? Post your questions here

Post » Thu Sep 04, 2014 9:43 pm

Hey guys
First of all.. sorry for my bad english

I would like to have an arrow in my game that constantly points at single sprite. For example like in old GTA
1.jpg


It also needs to keep pointing at that direction even if its off the screen.
I watched many tutorials and this is almost the last thing I couldnt find in any of those.
Thanks!
You do not have the required permissions to view the files attached to this post.
B
10
S
2
Posts: 9
Reputation: 649

Post » Thu Sep 04, 2014 10:44 pm

B
24
S
9
G
4
Posts: 1,646
Reputation: 6,596

Post » Fri Sep 05, 2014 10:10 am

Try this demo
You do not have the required permissions to view the files attached to this post.
B
257
S
42
G
15
Posts: 1,991
Reputation: 41,411

Post » Sat Sep 06, 2014 12:39 pm

Message: Mato is not yet permitted to post plain text URLS (300 rep required). 1 URLS removed. Why?
codah wrote:Is this the same question?


Yeah..Didnt search for "Directional" :oops:
But anyway, that arrow you ve created is pointing only at that single sprite and the hard part for me is that it needs to be pointing at main hero as well.
directionalarrow.capx


One side of the arrow to game objective and other to the hero.
You do not have the required permissions to view the files attached to this post.
B
10
S
2
Posts: 9
Reputation: 649

Post » Sat Sep 06, 2014 1:11 pm

Lordshiva1948 wrote:Try this demo

Thanks
but I want to make top down game and Im not sure if I could make that arrow using animations. :/
B
10
S
2
Posts: 9
Reputation: 649

Post » Mon Sep 08, 2014 6:49 am

Why not? what is problem?
B
257
S
42
G
15
Posts: 1,991
Reputation: 41,411

Post » Mon Sep 08, 2014 8:00 am

Try this demo then
You do not have the required permissions to view the files attached to this post.
B
257
S
42
G
15
Posts: 1,991
Reputation: 41,411

Post » Mon Sep 08, 2014 11:25 pm

Well I almost got it :D
directionalarrow.capx

(use arrows to move)
but now i need to set that arrow to always stay near my hero, even when I move the hero far away from objective.. or am I doing it completely wrong? :?:
You do not have the required permissions to view the files attached to this post.
B
10
S
2
Posts: 9
Reputation: 649

Post » Tue Sep 09, 2014 1:47 am

How do want it to behave? You have to be more specific. Then we can translate it into code. I'm guessing it should rotate around an 'imaginary' circle that surrounds the player, in the standard way.

Try this
circular_direction_arrow.capx


Basically the change was to 'set position' at a certain position and radius based on the arrow's angle. You can change the arrow distance from player with the variable 'r'.

(got inspiration from here https://www.scirra.com/tutorials/1064/simple-circularelliptical-motion-with-slider-bar)
You do not have the required permissions to view the files attached to this post.
B
24
S
9
G
4
Posts: 1,646
Reputation: 6,596

Post » Tue Sep 09, 2014 10:22 am

Ok next time I ll try to be more specific but this is exactly what I was looking for ! :D

thanks a lot :)
B
10
S
2
Posts: 9
Reputation: 649

Next

Return to Beginner's Questions

Who is online

Users browsing this forum: No registered users and 0 guests