OFPEC Forum
Editors Depot - Mission Editing and Scripting => OFP - Editing/Scripting General => Topic started by: Arctic on 18 Apr 2003, 00:31:44
-
Is there a way to help prevent a collision of helos controlled by AI, without totally altering there waypoints?
-
The game includes anti-collision AI already ... are you experiencing a particular problem? What is happening?
-
helo1 flyinheight 30; helo2 flyinheight 45
Where helo is the name of the helo and the number is the height..
That might help... (depending on the details of your situation) ;)
Asmo
-
;D If you put the WPs in the same place and got the timing right that might look pretty funky
-
Set the helis to "careless" so that do not take evasive/dangerous manueveres.
ben
-
as asmo stated, different heights would help... as long as your problem is heloÂ's going to the same spot and then boom, where it shoudnÂ't be boom.
if they collide with stuff anyway, youÂ've got a bug. get your repellant.
-
The game includes anti-collision AI already
What anti-collision are you talking about? Helicopters seem drawn to each other as if by magnets :)
If two choppers "know about" the player then it doesn't matter what flying height they are set at. They will drop down low while they try to line up a shot. Eventually they will hit each other. ::)
-
OK, well just have a looping script. If the two helos are closer than a certain distance, make one climb and the other dive. Or stay at the same hieght rather, since you don't want it to crash.
-
I use a repeating trigger with great success.
condition
helo1 distance helo2 < 50
activation
helo1 setpos [getpos helo1 select 0, getpos helo1 select 1, (getpos helo1 select 2) +50]
If you see the trigger activate, it won't look so great, but it's better than having them collide and ruin the mission. Newer versions of OFP have improved anti-collision for AI units, so it may not even be necessary if you have resistance version.
-
Newer versions of OFP have improved anti-collision for AI units, so it may not even be necessary if you have resistance version.
Trust me, it's necessary :) I may try your little trick out.