Mujahedeen is on the right track. "Dostop" will only stop the unit until his group spots the enemy; then he will move around again at his leader's orders. Usually the leader will order the guy back into formation; then when the enemy is close enough, the leader will order his men to engage the enemy (meaning MOVE out and attack the enemy)
DisableAI "MOVE" will keep the guy from falling back into formation. With "MOVE" disabled, the unit cannot move from waypoint to waypoint, or via the "domove" command, or whatnot. However, he still
can move (read on).
If the AI leader of his group (the guy with his "move" AI disabled) orders him to engage the enemy, he can still
move, oddly enough. Ever seen the AI try to flank you? That is the movement I am talking about; they are 'engaging' you. As a side note, when the AI 'engages' you like this, the group leader stays put; only his men move to flank/assualt you.
So if an entire group has "move" ai disabled, then when the enemy is spotted, after a while the group members will move after the enemy, but the leader will stay put. I know this via painful experience with this problem myself, trying to figure out why some guys were still moving when "move" ai was disabled.
One fix is to make everybody their own leader, meaning making groups of one unit each. In this case you only need to disable "move" ai. Keep in mind that in this case there is no sharing of enemy positions between units near each other (see my script in the pending section for an example). So guy A in one window may shoot at the player, while guy B in the next window may be looking off to the side and never know anything is going on.
A better fix is to make everyone in large groups, so when one guy sees the player, his whole squad knows about him. To do this, you need to fix the problem I described above with guys moving to engage the enemy. This is a simple fix. Just add in this next line:
this disableAI "TARGET"
Disabling "target" doesn't mean the AI can't pick targets and shoot at them on their own; that is "AUTOTARGET". "Target" means they can't
move when engaging the enemy, as described above. Nothing more. So in combination, disabling "move" and "target" will give you a guy who will never be able to move again.
Sorry for the short novel, but in the past I have had such a frustrating experence, learning the above the hard way, and I don't want anyone else going through what I went through
In summary, put this in the guys init fields:
this disableAI "MOVE"; this disableAI "TARGET"; this setunitpos "UP"