OFPEC Forum
Editors Depot - Mission Editing and Scripting => OFP - Editing/Scripting General => Topic started by: cirkut5732 on 21 Mar 2005, 04:36:29
-
Hey guys quick question
i have about 8 loons Ive grouped and they are all mounted at M2 machine guns across my army base, problem is i cant get them to face the direction ive set there azimut, In other words I need 2 of them facing south 2 facing north to facing NW etc.. but they all want to kinda look in the direction of the group leader, Anyway around this without using a script, I remeber in the game you could give orders to your squad to face a certain direction, Any help is appreciated as always
-
loon1 setDir 0
loon2 setDir 0
loon3 setDir 90
loon4 setDir 90
loon5 setDir 180
:
etc
-
In situations like this I put a doWatch command in their init file. I pick and object a long way a way and tell them to watch it. I have not tried setDir
-
That sounds better than my idea. My way the loon might look that way for second then go back to looking everywhere else.
(lowers head in shame . . .) :'(
roni
-
Sorry guys neither of those works "forever" Using both commands seperate and together
the loons start facing the right direction but within seconds go back to looking the wrong way (In my case directly at a wall!! lol) So I guess i do need a looping script, Any suggestions?
-
#loop
Loon1 dowatch invisible
~2
goto loop
for loon1
#loop1
Loon2 dowatch invisble2
~2
goto loop1
for loon2
etc etc (u know how to do a script right?)
-
my suggestion - create 4 objects (like trees) or use game logics, name them gl_north, gl_south etc, place them as THobson suggested, a fair distance away but not out of the loons' sight, and use both dowatch and dotarget. that way they will continue to face that way.
-
You don't need to create an object. Just press the Show IDs button, zoom in a bit and pick a bush or something. Note its number and then put the following in the init field of the relevant loon.
this doWatch (object objectID)
I have found this to work for me and not just for a few seconds and I don't use a looping script either, but bedge's suggestion of doTarget would be a very good addition. In fact I might have another look at my mission with that in mind
-
Sorry guys neither of those works "forever" Using both commands seperate and together
the loons start facing the right direction but within seconds go back to looking the wrong way (In my case directly at a wall!! lol) So I guess i do need a looping script, Any suggestions?
I know the feeling. :'(
I had the same problem with my fixed position script. It works well with separate units,but once I run the script with a group, they all watch in the wrong direction. (mostly north)
I could use objects ID's to fix this, but it was not my goal to make them watch in one direction. They had to look behind them sometimes, when nessecary, and the don't do that when you give them a dowatch command.
I think it has something to do with the leader, he orders them to watch a certain direction even when you use dowatch stuff on them. Actually, separate AI units work best without dowatch commands, they will check their six automatically when they know there's somebody behind them.