a enemie tracking radar

Favourite 79 favourites
Tutorial written by sosensibleOriginally published on 16th, May 2013 - 13 revisions

Here is a great radar that shows where the enemies are compared to your position.
It may help if you use the .capx while doing this tutorial.


First of all, your going to need two layers with the proper paralex.
Name the first layer "game" setting the paralex to "100,100" then name the second layer "radar" and set the paralex to"0,0".

Basic objects

Now lets make the basic objects needed on the proper layers for this tutorial.
Were going no need enemies and a player put these on layer game,
and we need a radar(Make sure the collision shape is the how you want the radar and the point of origin is where you want the player to be represented) then make a small sprite to represent the enemies on the radar put both of these on layer radar.

Ok now lets get the code done be careful because this is the easiest area to mess up.

Here's a pic of the code

Making radar points

This is how we make sure we have enough dots.
Add a condition if (enemy.count>radardot.count) with an action (create object-radardot)

Radarpoint marking

This is the special piece of code I designed to track the enemies on the radar
add a condition (pick everyinstance enemy) with an action (set radardot.x to (enemy.x-player.x)0.05+radar.x set radardot.y to (enemy.y-player.y)0.05+radar.y)

_Be careful not to pick repeat for every instance because that does not work you must Choose pick every instance

Destroying dots

Now this will make sure you do not have to many dots
add a condition (on enemy destroyed)with an action (radardot destroy)

Only showing dots on the radar

This is how you get only the dots on the radar to appear
Choose condition (if radardot is overlapping radar) with an action(then set radar dot visible),and condition(if radardot is overlapping radar)-inverted then(set radar dot invisable)

Hope you enjoyed this and i' d love to see you guys spread the news and show me what your using it for

heres an exaple game on the arcade

Unlock your full gamedev potential

Upgrade to the Personal Edition of Construct 2, it has way more features and won't holding back from making money and using your full creativity like the free edition does. It's a one off payment and all Construct 2 editor updates are free for life!

View deals

Plus, it's got a lot of additional features that will help you save time and make more impressive games!

Congratulations on finishing this tutorial!

Did you learn a lot from it? Share it now with your friends!

Share and Copy this Tutorial

You are free to copy, distribute, transmit and adapt this work with correct attribution. Click for more info.


softjuarez 3,450 rep

Great tutorial!!!

Thursday, May 16, 2013 at 9:07:24 PM
Tedg 9,893 rep

Thank you for share this.

Thursday, May 16, 2013 at 9:12:16 PM
sosensible 10.3k rep

thanks for the feed back
if tutorial is a little confusing I do have a file you can veiw

Thursday, May 16, 2013 at 9:19:05 PM
sosensible 10.3k rep

also if you remove the part about the players position and replace the enemies with characters(players) it will give you a map instead of a radar

Thursday, May 16, 2013 at 10:28:27 PM
tyfricko 6,590 rep

Wow, great tut...

Thank you

Friday, May 17, 2013 at 8:26:37 AM
Lordshiva1948 44.3k rep

yes very nice, Thank you for sharing this

Friday, May 17, 2013 at 8:33:02 AM
AbelaNET 14.9k rep

Great Tutorial. Thanks

Friday, May 17, 2013 at 8:28:46 PM
Pixel perfick 12.3k rep

Nice one, thanks for this...

Monday, May 20, 2013 at 9:58:37 AM
pikofarad 1,632 rep

Nice and perfect tutorial. Thank u.

Monday, May 27, 2013 at 10:26:05 AM
ParCutz 3,092 rep

Wonderful. I love to learn and thanks to you, I did.

Wednesday, June 26, 2013 at 12:00:52 AM
sosensible 10.3k rep

thanks every body 10 favorites

Friday, June 28, 2013 at 1:54:41 PM
irina 6,924 rep

cant download/open CAPX !?

Friday, June 28, 2013 at 2:49:11 PM
sosensible 10.3k rep

try a different browser? i'm guessing your using Firefox doesn't seem to work in it

Saturday, June 29, 2013 at 1:52:12 PM
Blacksmith 8,782 rep

Nice work, simple and easy to follow! Thanks sosensible :)

Saturday, June 29, 2013 at 2:38:46 PM
sosensible 10.3k rep

sorry irina I cant fix problems scirra has on their site

Sunday, June 30, 2013 at 2:11:00 PM

Leave a comment

Everyone is welcome to leave their thoughts! Register a new account or login.