How to make Nav icons like in old space games?

Get help using Construct 2

Post » Tue Feb 25, 2014 11:37 pm

Nav icons of important locations (stations/planets/gates) that appear on the edge of the screen in relation to where the location is to the player's ship, so that if the player turn and head towards it, if they maintain course, they fly towards that location.. if you guys know what I mean. For a top down 2D layout.

Is there an efficient way to do such a thing? Because I can't see an easy way to do it while keeping the icons on the edge of the screen..

Code wise, how would you approach this problem?
B
70
S
24
G
19
Posts: 1,757
Reputation: 17,616

Post » Wed Feb 26, 2014 10:42 pm

Any C2 guru care to shine a light on this problem?
B
70
S
24
G
19
Posts: 1,757
Reputation: 17,616

Post » Wed Feb 26, 2014 11:13 pm

Just need to do maths here. With some position calculating and margin, you've got this. Arrows to control the player.
Destinations are in blue, pointers to them in green.
You do not have the required permissions to view the files attached to this post.
B
17
S
8
G
4
Posts: 473
Reputation: 6,211

Post » Wed Feb 26, 2014 11:22 pm

@Guizmus Thank you, that is perfect exactly like in old space sims. Much gratitude!

Also, never knew about Viewport, its so handy, Viewport right needed a -10 else the navs are offscreen :p
B
70
S
24
G
19
Posts: 1,757
Reputation: 17,616


Return to How do I....?

Who is online

Users browsing this forum: tarek2 and 29 guests