Home   Help Search Login Register  

Author Topic: Hunting script  (Read 1086 times)

0 Members and 1 Guest are viewing this topic.

Hartza

  • Guest
Hunting script
« on: 29 Aug 2002, 11:09:42 »
I have mission where 10 Ultralight men with UltraLight planes are trying to rescue resistance leader, captured by soviets.

Missions name is Snakeshit, which means that they have to fly lower than snakeshit  ;)

If they fly higher than radar, they are discovered and 3 soviet helos are going to hunt them.

Now, when soviet helos starts to hunt them each helo uses it's own script like this. I have to do this by memory, because I am at work right now  ;D:

westlist=[plane1,plane2,plane3...plane10]

#seek
_total = count westlist
_i = random(_total)
_target = westlist select _i
#loop
helo1 DoMove Getpos _target
?!(alive _target):goto "seek"
?_total <=1:goto "stop"
~10
goto "loop"
#stop
helo1 DoMove Getpos home1

Idea is that helo pickup its target and goes after it.
If target dies (shot down), it picks up new target. If there are no targets, it goes back home.

Problem: helos goes after these Ultra light planes, but they don't shoot them ! !
SetBehaviour seems to be Yellow, even I set 1 waypoint with Open fire engage at will ( same waypoint activates whole script ) and tried to add same command, plane1 SetBehaviour "RED" to my script.

What shall I do  ???

Forgot to say: Ultra lights are resistance and resistance is hostile to east.
« Last Edit: 29 Aug 2002, 11:19:04 by Hartza »

tai mai shu

  • Guest
Re:Hunting script
« Reply #1 on: 30 Aug 2002, 06:01:27 »
give it hte reveal command.

if that doesnt work, add in a command to check if teh distance between the ultralight and chopper is less than firing distance maybe 200-300 meters.  when this is true, give the chopper the dofire command, thatll work.

Hartza

  • Guest
Re:Hunting script
« Reply #2 on: 30 Aug 2002, 08:28:59 »
Thanks tai mai shu !

I will try that ....

I also noticed that one part of problem was that my choppers ( V-80 ) did fall all by them self. I changed them to Mi-24 and they seems to fire planes, so if I add those things you suggested my mission should be complete  ;D