Muzza 0 Posted December 2, 2009 Hello, in my new mission a player will create a marker using an m203 flare. Air support will make life within a radius of this marker very difficult. I am using the createvehichle command to add an explosion on the position of the marker, however i would like more explosions wthin 50m of this marker. Either i can createvehicle within a radius of my marker, or i can create a makrer 25m north, 25m south,.... so that when the first marker is made, a few others are made in a set around it. Does anyone know how i can do this? Share this post Link to post Share on other sites
jw custom 56 Posted December 2, 2009 I think you could find this script useful: http://forums.bistudio.com/showthread.php?t=89376 Also take a look at Urban Patrol Script it have code you might get ideas from. Here's a part of a script i made which drops mortar/arty in a radius of 300m. It's not perfect but it works decently. while{mortar1}do { _iniposX = (getMarkerPos "mortarPos1" select 0) - 300; _iniposY = (getMarkerPos "mortarPos1" select 1) - 300; _dropPosX = _iniposX + (random 600); _dropPosY = _iniposY + (random 600); _shell = "Sh_85_HE" createVehicle [_dropPosX, _dropPosY, 150]; sleep 3; }; Share this post Link to post Share on other sites
shuko 59 Posted December 2, 2009 Either i can createvehicle within a radius of my marker, or i can create a makrer 25m north, 25m south,.... so that when the first marker is made, a few others are made in a set around it. Does anyone know how i can do this? http://forums.bistudio.com/showthread.php?t=89376 SHK_pos = compile preprocessfile "SHK_pos.sqf"; _m = createmarker ["theNorthMarker", ([getmarkerpos "nameOfTheFirstMarker",0,25] call SHK_pos)]; _m = createmarker ["theSouthMarker", ([getmarkerpos "nameOfTheFirstMarker",180,25] call SHK_pos)]; You can do as many as you wish and in any direction (0-359) and distance. Share this post Link to post Share on other sites
Defunkt 431 Posted December 2, 2009 (edited) Snap, just wrote the following while you were posting: _origin = markerPos "Flare"; _new_x = (_origin select 0) + (Random 25) - 50; _new_y = (_origin select 1) + (Random 25) - 50; _create = createMarker ["Add1", [_new_x, _new_y, _origin select 2]]; Edited December 2, 2009 by Defunkt Share this post Link to post Share on other sites