Jump to content

Recommended Posts

l0oAjfp.jpg

 

 

Download:

MIL_Mirror: Dropbox/Armaholic

 

Description:

Another pretty basic script, MIL_ClearGrass allows players to create firelanes through grass or to simply clear small patches of grass to give unobstructed observation. "Land_ClutterCutter_small_F" is used to clear the grass, and when clearing patches is spawned 0.5m in front of the player.

 

Features:

- AddActions to clear a small patch of grass, or clear a point-to-point line through grass.
- Mission designers can choose to enable/disable clearing of both patches and/or firelanes.
- Mission designers can also add a required item to be in the player's inventory to be able to clear any grass.

 

To use:

- Copy the file MIL_ClearGrass.sqf to your mission folder.
- Run the script on clients (from init.sqf or initPlayerLocal.sqf) using:

nul = [_availableActions,_itemsRequired] execVM "MIL_ClearGrass.sqf";

- _availableActions - number (optional)
                    - default: 0
                    - determine what grass clearing option can be used
                        - 0 - both
                        - 1 - clear grass patch
                        - 2 - clear fire lane
- _itemsRequired - array of strings (optional)
                 - default: []
                 - classNames of any items required to clear any grass

- Example:
nul = [] execVM "MIL_ClearGrass.sqf";
    - Players will be able to use both actions without restrictions.
nul = [1,["ACE_EntrenchingTool"]] execVM "MIL_CAS.sqf";
    - Players will only be able to clear patches of grass any need to have an ACE Entrenching Tool in their inventory.

 

Media:

Small demo of clearing some grass for a prone machine gunner (1.00s):

 

Known issues:

- Be aware, it can be a bit fiddly sometimes to get the right spot to remove patches of grass.

 

If anyone finds any problems please let me know.

 

Thank you.

  • Like 4

Share this post


Link to post
Share on other sites

Edited the OP slightly to indicate that this should be executed locally for clients.

  • Like 1

Share this post


Link to post
Share on other sites

Not sure if this is open code ore...

 

I found it in a Alive mission somtime ago....

 

if (!isDedicated) then {
  _action = ["action_L16_grasscutter","Remove grass","",{if (stance player == "PRONE") then {player playMove "AinvPpneMstpSnonWnonDnon_Putdown_AmovPpneMstpSnonWnonDnon";} else {player playMove "AinvPknlMstpSnonWnonDnon_medic0";}; [10, [], {_cutter= "Land_ClutterCutter_medium_F" createVehicle [0,0,0]; _cutter setPos (getpos player);}, {}, "Remove grass"] call ace_common_fnc_progressBar;},{true;}] call ace_interact_menu_fnc_createAction;
  [(typeOf player), 1, ["ACE_SelfActions", "ACE_Equipment"], _action] call ace_interact_menu_fnc_addActionToClass;
};

this add the option in ace menu to remove grass

Share this post


Link to post
Share on other sites

Our ruggedly good looking scripter from down undah strikes again!  Good on ya mate!

  • Like 1
  • Haha 1

Share this post


Link to post
Share on other sites

I always roll on the grass to make it flat... Don't need this, lol JK! :smileee:

  • Haha 1

Share this post


Link to post
Share on other sites
2 hours ago, gc8 said:

I always roll on the grass to make it flat... Don't need this, lol JK! :smileee:

Haha i know, but it always grows back!!

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now

×