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.
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; }