OFPEC Forum

Editors Depot - Mission Editing and Scripting => OFP - Editing/Scripting General => Topic started by: Arctic on 18 Apr 2003, 00:31:44

Title: Helo Anti-Collision
Post 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?
Title: Re:Helo Anti-Collision
Post by: macguba on 18 Apr 2003, 00:35:52
The game includes anti-collision AI already ... are you experiencing a particular problem?   What is happening?
Title: Re:Helo Anti-Collision
Post by: asmodeus on 18 Apr 2003, 00:51:25
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
Title: Re:Helo Anti-Collision
Post by: macguba on 18 Apr 2003, 00:55:11
 ;D If you put the WPs in the same place and got the timing right that might look pretty funky
Title: Re:Helo Anti-Collision
Post by: benreeper on 18 Apr 2003, 01:00:48
Set the helis to "careless" so that do not take evasive/dangerous manueveres.

ben
Title: Re:Helo Anti-Collision
Post by: Der_Richter on 18 Apr 2003, 02:10:36
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.
Title: Re:Helo Anti-Collision
Post by: deaddog on 18 Apr 2003, 20:23:04
Quote
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. ::)
Title: Re:Helo Anti-Collision
Post by: macguba on 18 Apr 2003, 20:45:17
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.
Title: Re:Helo Anti-Collision
Post by: CrashnBurn on 19 Apr 2003, 03:20:00
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.
Title: Re:Helo Anti-Collision
Post by: deaddog on 19 Apr 2003, 06:05:52
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.