OFPEC Forum
Editors Depot - Mission Editing and Scripting => OFP - Editing/Scripting General => Topic started by: Captain Crunch on 19 Jan 2004, 07:55:02
-
An AI controled Mi-24 patrols an area at 50 FlyInHeight with a pilot and a gunner (Of course!) on a seek and destroy waypoint as followed:
Combat Mode: Open Fire, Engage At Will
Speed: Limited
Behaviour: Careless (So the light stays on)
Condition: True
On Activation: Helo FlyInHeight 50
My problem is, the gunner doesn't attack at all! What can be done to make him shoot the targts???
Thanks in advance
-
'cause he's in careless?
:beat: *Gets Shot* :beat:
-
Indeed because he's in careless mode. He's CARELESS so he doesn't care wether there's enemy or not or wether he get's shot or not.
-
No. I've tried in every mode and it still doesn't fire. Careless is actually the last mode I've tried. I thought it was better since the chopper at least kept the light on to see better!
Any other ideas?
-
Give him more skill?
If you have it just like you've described above and his behaviour in aware or danger, he should attack.. if he can see the enemy :-\
If everything else failes you can do some neat script to reveal the targert for him, or even make him target and fire on them.
-
Yes. I'll do that! Thanx for Your help Artak! ;)
If I'm not abusing, I'm trying to use the command "KnowsAbout" and I use it like that in the "Init" field of the Pilot and Gunner but it doesn't work. My syntax isn't good. I've checked the official and the unofficial comref but none of the examples work. Do you have any idea if this works at all and how??
I've tried this: Air1 KnowsAbout Me
And this: Air1 KnowsAbout Me = 4
And then this Air1 KnowsAbout Me > 4
Can You help me?
-
The one above is just plain wrong. The two below show some potential.
Air1 KnowsAbout Me
This is missing the most essential part. The howmuch.
Air1 KnowsAbout Me = 4
In OFP you need to use == when your asking if something is equal. Use = when your defining something to something.
Air1 KnowsAbout Me > 4
The knowsabout command has values from 0 to 4. So if we read that line of code it would be
If Air1 knowsabout Me is above 4 then..
But when 4 is the max value for the knowsabout command your statement can never be true because it's checking when it's ABOVE 4, which it can never be.
The official command reference has explinations of all the mathematical symbols used in OFP. For example if you want to check if Air1 knowabout you more or equal to 3 you put
Air1 knowsabout Me >= 3
-
This is a very annoying problem, and you aren't the first to have it. Basically, helos don't really care to attack infantry. Check out this thread here:
http://www.ofpec.com/yabbse/index.php?board=6;action=display;threadid=14814;start=0 (http://www.ofpec.com/yabbse/index.php?board=6;action=display;threadid=14814;start=0)
-
Thanx a lot for You guys support! Very nice! Hmmm. However, I've tried the syntax
Pilots KnowsAbout Me == 4 but I get an error message saying: Type Bool, expected nothing
I typed it into the "Init" field of the pilot and Gunner of the Helo. What am I doing wrong?
...I'll check the link General Barron gave me as well!
Many thanks again guys! ;)
-
Hi, most important thing if you want the helo to engage infantry is make sure the FlyinHeight isn't more than 15. (This could give you problems if there are a lot of trees around). Otherwise he just won't see anyone.
-
Eh thanx guys!
I'm just reading the linked thread General Barron sent me!!
8) Great, it actually solves three of my problems! 8) Super thanx for You guys help, patience and support!! ;D 8)
But what about the KnowsAbout command? What is wrong with the syntax?
Pilots KnowsAbout Me == 4
but I get an error message saying:
Type Bool, expected nothing
I typed it into the "Init" field of the pilot and Gunner of the Helo. What am I doing wrong
-
Try:
? (Pilots KnowsAbout Me) == 4 : dowhateveritisyouwantittodo
Planck
-
KnowsAbout will only go as high as 4 when your about 30 odd meters away. 4 is the maximum, when you get shot at its about 1.5.
A rough guid, this is infantry spotting infantry, without binoculars, in the open on the desert island:
(http://homepages.gotadsl.co.uk/~gssoft/knowsabout.jpg)
If you want the AI to target you, try Air1 DoWatch Player. He should know everything about you then, regardless of LOS.
Edit: I just checked, DoWatch will send the Heli almost straight to you. Upping the skill level makes a big difference to, and probably better than using DoWatch.
-
Try putting that knowsabout line in a trigger. I'm thinking that knowsabout can't be used in init fields.. and why the heck would anyone want to?! :D