OFPEC Forum
Editors Depot - Mission Editing and Scripting => OFP - Editing/Scripting General => Topic started by: Captain Crunch on 22 Jan 2004, 23:06:57
-
Is it possible to prevent an M2 gunner to turn in all direction?
for example, I have build a little wall with a small opening and positioned an M2 behind it. My problem is if I come from his back, he turns and shoots. What would actually be impossible because of the wall.
Is possible to make him face only a few degrees in front?
thanks in advace
-
I suppose you could tell him to watch only a certain direction, but not sure if it works......never tried it.
Something like:
unit doWatch getmarkerposition "markername"
Try that in his init field.
You would need to place a marker in the direction you want him to watch. And give it a name.
Let me know if it works.
-
Yes it does but he watches only straight to the marker.
It would be better if he would move a little, lets say around 25 degrees each side of the marker. Because as it is now, he will only fire if I put myself straight in front of him.
I tried enlarging the marker size but it doesn't work.
More ideas? We're getting there.
-
The problem with doWatch is that the condition is satisfied as long as the loon can see in the given direction: it's ok if it's out of the corner of his eye rather than straight ahead.
To make him move as if scanning you'll need a bunch of gamelogics in appropriate places and a wee script making him look them in turn. You could do it in order or some kind of random thing.
-
If nothing else works.. You could make a M2 that could only turn 25*..
A last resort, though..
- Ben
-
How would I make an M2 that can only turn 25°?
Would I have to work the Config of the .pbo??