This resource is created for Game Maker 5 and isn't compatible with the latest version of Game Maker.
My apologies for the inconvinience.
My apologies for the inconvinience.
| Circulair radar script |
//////////////// Circulair radar script //////////////////// // // Copyright Simon Donkers 27-1-2005 // www.simondonkers.com - gmmentor@simondonkers.com // // the arguments are: behind is recommandable value // argument0 is radius // argument1 is controller object // argument2 is fixing point x // argument3 is fixing point y // argument4 is radius of what is visible. // // This script will create a circulair radar at the // left bottom corner of the screen with the given radius // In this circle all objects within distance argument4 to // the fixing point will be drawn by there sprite but scaled // argument1 or objects whose parent this object is // will not be drawn // ///////////////////////////////////////////////////// global.center_x:=view_left[0]+view_width[0]-10-argument0; //x coordinate of circle global.center_y:=view_top[0]+view_height[0]-10-argument0; //y coordinate of circle pen_size:=1; brush_style:=bs_solid; brush_color:=c_yellow; //The background color of the radar. draw_circle(global.center_x,global.center_y,argument0); with all { //if it isn't a controller and it is within distance if object_index!=argument1 and point_distance(argument2,argument3,x,y)<argument4 then { draw_sprite_ext(sprite_index, -1,global.center_x+(x-argument2)/argument4*argument0, global.center_y+(y-argument3)/argument4*argument0, argument0/argument4,argument0/argument4,1); } } pen_color:=c_black; //border color of the radar pen_size:=4; //border width of the radar. (Some objects might be visible whose origin is within the circle but of which the rest of the body isn't. This border will be drawn over them brush_style:=bs_hollow; draw_circle(global.center_x,global.center_y,argument0); |
Tip: Have a look at the tutorial How to execute a script
User comments
| TheMaN posted at 2005-02-19 00:35:29 | ![]() |
| daniel posted at 2005-03-09 18:03:29 | ![]() |
| No_SkillZ posted at 2005-04-02 03:37:42 | ![]() |
| CHK posted at 2005-05-21 11:43:50 | ![]() |
| -={SaLmIaK}=- posted at 2005-06-09 10:20:47 | ![]() |
| Brenden posted at 2005-12-03 06:21:12 | ![]() |
| Simon Donkers posted at 2005-12-03 11:37:34 | ![]() |
| Alegria posted at 2006-06-26 23:33:17 | ![]() |
| Simon Donkers posted at 2006-06-27 09:45:38 | ![]() |
| finney posted at 2006-08-16 21:30:21 | ![]() |
| kizacolo posted at 2006-08-27 02:42:26 | ![]() |
| boi posted at 2006-12-25 22:17:01 | ![]() |
| PAG07 posted at 2007-04-21 22:32:03 | ![]() |
| mike posted at 2007-04-30 20:17:47 | ![]() |
| scorpafied posted at 2007-06-26 02:26:42 | ![]() |
| Simon Donkers posted at 2007-06-27 08:11:48 | ![]() |
| blue fire films posted at 2008-02-05 22:32:51 | ![]() |
| blue fire films posted at 2008-02-05 22:35:00 | ![]() |
| tiger posted at 2008-07-10 10:28:00 | ![]() |
| ktccd posted at 2008-12-05 12:50:23 | ![]() |
| YYUU posted at 2009-01-25 11:38:30 | ![]() |
| Adude posted at 2009-01-28 23:09:41 | ![]() |
| Shocker posted at 2010-05-07 13:37:45 | ![]() |
| Isaac posted at 2010-08-02 09:55:55 | ![]() |
| Sinoco posted at 2010-09-13 12:21:23 | ![]() |
| Simon Varley posted at 2010-10-04 21:15:07 | ![]() |



