The nature of OFP's AI will mean that the squad will rush out to meet an attack whether or not a hold waypoint is used.
Unfortunately ou cannot enable the AI later, although you can delete the unit and replace it with an identical one.
Actually, there is a way. Anytime the game is saved, whether is be by clicking "Save", or by using the code, savegame, the AI are re-enabled. Also, any time a game is loaded the AI is enabled. I strongly suggest using DisableAI, I have found it to work in the past. The problem with the save game bug is easily worked around, as I will explain.
The first thing you want to do is add all of the units in the trenches to an array. This is easily done by creating a trigger over all of the units in the trenches, then setting the trigger to activate by that side being present. In the On Activation field, put:
TrenchUnits = thislist;
Now the units are in an array, which will make our task much easier.
Moving on. In order for this to work, the player can NOT use the Save button when the game is paused. It is imperative that you tell the player this in the readme. Using the Save button
will break the mission. However, there is a way for the player to save the game as long as he is the leader of his group. To do this, create a trigger and make it activated with Radio Alpha (or whatever radio you want). Then, in the On Activation field, put:
savegame; {_x disableAI "MOVE"} foreach TrenchUnits; {_x disableAI "TARGET"} foreach TrenchUnits;
Now when the player saves the game the units will have their AI re-disabled.
We're not done yet, though. What happens if the player loads a game? As I said earlier this will also break the game. There is a solution. Through a trigger or init.sqs, call a script called resave.sqs:
[] exec "resave.sqs"
Now create a new text document and name it resave.sqs. Copy and paste the following code into the newly created script:
~1
#Loop
?time < 1: goto "reset"
~.01
goto "Loop"
#reset
{_x disableAI "MOVE"} foreach TrenchUnits
{_x disableAI "TARGET"} foreach TrenchUnits
goto "Loop"
Viola! Then men in the trenches should now stay where they are.
-Pilot