OFPEC Forum
Editors Depot - Mission Editing and Scripting => OFP - Editing/Scripting General => Topic started by: griff122 on 27 Jan 2004, 07:49:26
-
i'm new here, on leave from Iraq, just hoping to get a quick answer. how do you get units to stay at a waypoint and fight there. i tried hold but they akways run off to attack the enemy. also, something wierd is happening when i place ai planes. they just start moving as soon as the mission starts. i can start them 'flying' but if put on the ground they will 'drive' until the run into the water- any ideas?
by the way- i've ben gone almost a year and the work the ofp community has done is GREAT! keep up the work.
-
Welcome back!
Loons at a hold waypoint will run after the enemy for some distance, but then they will come back again. Exactly what do you mean, stay at a waypoint? If you mean actually stay in position, like at a sentry box, then you'll need a little scripting. If you just mean not move more than 10 yards away ... I dunno, you could still do with a little scripting but you're right, I can't help feeling that a waypoint should do that. What happens if you have a simple move wp synchroed to a trigger so they don't move on till the trigger condition is true?
Don't start a plane on the ground unless it is on a working airfield: silly things happen. Take it's fuel away if you want it to sit on the ground somewhere.
-
i think move WP w/ open fire only (not engage @ will) arghhhh da last taam i used WPs ::)
shud make em stay more or less in place ?
if not try dis script
_pos = _This select 0
_rad = _this select 1
_group = _this select 2
#loop
"if (_X distance _pos > _rad) then {_X domove getpos _rad}" foreach units _group
~5
? ex_LCDs_SCRIPT : "_X dofollow leader _X" foeach units _group; exit
goto "loop"
som1 who knows maths - fix da {_X domove getpos _rad} part so it becomes randomal ::) i just forgot how 2 do it (wich is strange cuz i didnt dat yrestedez mebe im just on 1 beer 2 much ;D ::)
LCD OUT
-
Thanks for the info, I'll try it out :)
-
btw i was somwat in rush so heres som notes bout da script ::)
exec it like dat
[MiddlePosition,radiusAroundPos,GroupName] exec "scriptname.sqs"
2 exit it use
ex_LCDs_SCRIPT = true
btw ull need 2 create difrent variables (edit da script) 2 use it mor n 1ce
LCD OUT