Any radar scripts available?

Posted By: FutureRaptor

Any radar scripts available? - 12/20/10 21:02

I need a radar script for my plane game. The enemy planes have to show up on my radar screen when they are within range. Any examples will be greatly appreciated.
Posted By: GnR

Re: Any radar scripts available? - 12/22/10 06:02

check out the gamestudio online magazine aum95 which shows you how to build a minimap. http://www.conitec.net/english/gstudio/aum.php
Posted By: FutureRaptor

Re: Any radar scripts available? - 12/23/10 00:47

Cool thanks, will see if I can work something out!
Posted By: paracharlie

Re: Any radar scripts available? - 12/23/10 01:08

I hate when someone takes the time to post a generic link but not the extra minute it takes to actually help someone.

Here is an actual simplified radar code that can be built on.

Code:
action entity_radar() // attach this action to the radar entity

{

       while (1)

       {

               // scan all the entities that are closer than 1000 quants to this entity

               c_scan(my.x, my.pan, vector(360, 180, 1000), IGNORE_ME); 

               wait (1);

       }

}

 

function i_am_scanned()

{

       while (event_type == EVENT_SCAN)

       {

               my.ambient = 100;

               wait (1);

       }

       my.ambient = 100;

}

 

action scanned_entities() // attach this action to the scanned entities

{

       my.emask |= ENABLE_SCAN; // make the entity sensitive to scanning

       my.event = i_am_scanned;

}


Posted By: FutureRaptor

Re: Any radar scripts available? - 12/23/10 22:21

That one seems to work but how can I get that to display dots on a radar screen. I need to have an animated radar and the radar targets on it as dots.
© 2024 lite-C Forums