A-SUICIDAL 11 Posted January 20, 2013 Is it possible to remove grass within a specific area? Like maybe within the radius of a trigger? Share this post Link to post Share on other sites
ProfTournesol 956 Posted January 20, 2013 Yes, there's an object which purpose is to cut the grass (called lawn mower or whatever). Share this post Link to post Share on other sites
A-SUICIDAL 11 Posted January 20, 2013 Sounds like you're hitting the pipe again. Unless you were actually serious with that response. I'm not looking to cut the grass, I just need to remove it within a specific small area. Share this post Link to post Share on other sites
iceman77 19 Posted January 20, 2013 idk man go look at the modules, I wouldn't be suprised if there was some lawnmower module. Else, prof is kidding :rolleyes: Share this post Link to post Share on other sites
Tankbuster 1747 Posted January 20, 2013 It's called grasscutter. It was in Armed Assault and disappeared in Arma2, much to the annoyance of many. But it's made a come back in Arrowhead. Classnames (in order of diminishing size) ClutterCutter_EP1 ClutterCutter_small_EP1 ClutterCutter_small_2_EP1 Share this post Link to post Share on other sites
ProfTournesol 956 Posted January 20, 2013 It's called grasscutter. It was in Armed Assault and disappeared in Arma2, much to the annoyance of many. But it's made a come back in Arrowhead.Classnames (in order of diminishing size) ClutterCutter_EP1 ClutterCutter_small_EP1 ClutterCutter_small_2_EP1 This. In French it's translated like lawn mower, which is funny. Share this post Link to post Share on other sites
A-SUICIDAL 11 Posted January 20, 2013 Thanks, I will try to spawn them at marker positions and see if it works. Share this post Link to post Share on other sites
Tankbuster 1747 Posted January 20, 2013 Here's a small one at the same pos as the flag pole and here's a large one. They are in empty>objects grasscutter Share this post Link to post Share on other sites
A-SUICIDAL 11 Posted January 20, 2013 Yeah, it works, but in order to clear the grass within the base, which is a 45x86 rectangle area, I would need to place about 100 markers and then spawn a ClutterCutter_EP1 at each marker position. Where can I find the class names for the different types of grass? at missions start: grass_count = 0; then run some kind of script like this: while {grass_count < 1} do { _object_grass = (getMarkerPos "respawn_west") nearObjects 150; {if (_x isKindOf "GRASS_CLASSNAME") then {sleep 0.1; deletevehicle _x}} forEach _object_grass;}; grass_count = grass_count + 1; Share this post Link to post Share on other sites
tryteyker 28 Posted January 20, 2013 Grass doesn't have a classname IIRC. Share this post Link to post Share on other sites
iceman77 19 Posted January 20, 2013 I believe it does. I've never had to do anything with grass aside from adjusting the terraingrid, so I'm not 100%. But I think the OA gras differs from A2 grass. And maybe even different classes of each too. Share this post Link to post Share on other sites
A-SUICIDAL 11 Posted January 20, 2013 It must have some sort of reference name or something. Share this post Link to post Share on other sites
Tankbuster 1747 Posted January 20, 2013 Grass and plants don't have classnames. They have models, but not classnames. Share this post Link to post Share on other sites
f2k sel 164 Posted January 20, 2013 (edited) Perhaps something like this for a larger area, place an object top left and pass the sizes //null=[objectname,86,45] execvm "cutter.sqf" _start = getpos (_this select 0); _xpos = _this select 1; _ypos = _this select 2; for [{_xx = 0},{_xx < _xpos},{_xx = _xx + 10}] do { for [{_yy = 0},{_yy < _ypos},{_yy = _yy + 10}] do { veh = createVehicle ["ClutterCutter_EP1",[(_start select 0) +_xx,(_start select 1)+_yy,0],[], 0, "can_collide"]; };}; I'm not sure how you would do it if the base is on an angle though Edited January 20, 2013 by F2k Sel Share this post Link to post Share on other sites
A-SUICIDAL 11 Posted January 20, 2013 I'll try it. The base is very flat. When trying to spawn enough clutter cutters to cover my base, it took 153 of them. 9 collums by 17 rows, each clutter cutter is 1 grid square away from the next. At mission start the grass is removed. There is a nasty bit of lag while it removes the grass. It would be so much easier if there was a way to remove the grass within a trigger radius some how, without having to add a ton of ugly markers to my base. At least I made the markers 0.5 x 0.5 in size and colored them white named ng1 - ng167 (ng for "no grass"). Share this post Link to post Share on other sites
f2k sel 164 Posted January 20, 2013 (edited) Slight improvement. Place a trigger over the are you want to clear and name ie trig1 Then set the are much larger than what you neeed. When the program runs it will only remove grass within the trigger circular, oval or rectangle //null=[objectname,86,45,trig1] execvm "cutter.sqf" _start = getpos (_this select 0); _xpos = _this select 1; _ypos = _this select 2; _trig = _this select 3; for [{_xx = 0},{_xx < _xpos},{_xx = _xx + 10}] do { for [{_yy = 0},{_yy < _ypos},{_yy = _yy + 10}] do { _newpos = [(_start select 0) +_xx,(_start select 1)+_yy,0]; if ( [_trig, _newpos] call BIS_fnc_inTrigger) then { veh = createVehicle ["ClutterCutter_EP1",_newpos,[], 0, "can_collide"]; };};}; Edited January 20, 2013 by F2k Sel Share this post Link to post Share on other sites
A-SUICIDAL 11 Posted January 20, 2013 I tried the first script and it worked well. I used an invisible helipad as the object and placed it in the center of the base area. It worked, but it did not use the same direction that the invisible H was pointing in, which was 300 degrees. I will try your second script now that uses a trigger. ---------- Post added at 06:19 PM ---------- Previous post was at 06:02 PM ---------- I placed a trigger 45 x 87 at an angle of 300 and named it "trig1". I placed and invisible helipad named "Hcutter" in the center at an angle of 300 - right on top of the trigger. In the init of the invisible helipad I put: null=[Hcutter,45,87,trig1] execvm "cutter.sqf"; Then I used your script: cutter.sqf: _start = getpos (_this select 0); _xpos = _this select 1; _ypos = _this select 2; _trig = _this select 3; for [{_xx = 0},{_xx < _xpos},{_xx = _xx + 10}] do { for [{_yy = 0},{_yy < _ypos},{_yy = _yy + 10}] do { _newpos = [(_start select 0) +_xx,(_start select 1)+_yy,0]; if ( [_trig, _newpos] call BIS_fnc_inTrigger) then { veh = createVehicle ["ClutterCutter_EP1",_newpos,[], 0, "can_collide"]; };};}; But it didn't work. I didn't see any change and I received no errors. Share this post Link to post Share on other sites
f2k sel 164 Posted January 20, 2013 I just copied the script back and it works, did you set the trigger name trig1 and not the text? Share this post Link to post Share on other sites
A-SUICIDAL 11 Posted January 20, 2013 ...yes axis a: 45 axis b: 87 angle: 300 shape: rectangle trigger name: trig1 activation: none condition: this Invisible Helipad name: Hcutter init: null=[Hcutter,45,87,trig1] execvm "cutter.sqf" ---------- Post added at 06:51 PM ---------- Previous post was at 06:32 PM ---------- and I just added a functions module, still no luck. Anything else I might be missing? Share this post Link to post Share on other sites
f2k sel 164 Posted January 20, 2013 add this to the top of the script, maybe the function is running to soon. waitUntil {not(isNil "BIS_fnc_init")}; Other than that I can't see anything wrong. Share this post Link to post Share on other sites
A-SUICIDAL 11 Posted January 21, 2013 (edited) waitUntil {not(isNil "BIS_fnc_init")}; worked! but I still can't get it to use the correct angle of 300. It seems to want to face north 0 degrees. ---------- Post added at 07:10 PM ---------- Previous post was at 06:53 PM ---------- Like you mentioned earlier, I would need to make it much bigger to cover the area. I'll play around with it a bit and see if I can get it to at least cover the base area enough that it gets the job done. I very much appreciate the help you've offered me. Thanks F2K Sel :) Edited January 21, 2013 by A-SUICIDAL Share this post Link to post Share on other sites
f2k sel 164 Posted January 21, 2013 I just had the same problem when I moved location, it seems to depend where you place the start point. I'm finding bottom left is working well now, which may make sense as were adding the x and y positions to the start pos. I find placing a flag pole in each corner of the trigger helps identify the area. Share this post Link to post Share on other sites
A-SUICIDAL 11 Posted January 21, 2013 Yeah, bottom left works great. I got it to remove all the grass at my base. Now my base doesn't look like it an abandoned outpost that has not be well maintained. This is a good script. Thanks again. Share this post Link to post Share on other sites
f2k sel 164 Posted January 21, 2013 Great glad it works it bugs me at times. Share this post Link to post Share on other sites