Jump to content
Sign in to follow this  
Meatball0311

AI does not see vehicle?????

Recommended Posts

I placed my F/A-18 right next to a AA Russian Soldier and a Russian Anti Aircraft Tank. Both of the units walk pass and do nothing. I then open the canopy and get out and the Russians start firing at the pilot?? This is my config for the plane:

class CfgVehicles {
	class Air;

	class Plane: Air {
		class NewTurret;	// External class reference
		class EventHandlers;
};



class fz_f18abase : Plane {
	scope = private;
	displayName = "F/A-18";
};

	class fz_f18f_aws : fz_f18abase {
 	destrType = "DestructWreck";
 	scope = public;
 	side = WEST;
 	vtol = 0;
 	fov = 0.5;
 	displayName = "F/A-18F Super Hornet 01(USMC)";
 	vehicleclass = "MAR_FA18F";
 	model = "\fz_f18\fz_f18f_aws";
 	picture = "\fz_f18\fa18_pic.paa";
 	icon = "\fz_f18\fa18_icon.paa";
 	mapSize = 17;
 	faction = "2nd_MAW";
 	crew = "mar_fighter_pilot";
 	camouflage = 10;
 	audible = 6;
 	accuracy = 0.8;
 	supplyRadius = 8;
 	radarType = 4;
 	laserScanner = 1;
 	laserTarget = 1;
 	irScanGround = 1;
 		irScanRangeMin = 4000;
 		irScanRangeMax = 10000;
 		irScanToEyeFactor = 2;
 		LockDetectionSystem = 8 + 4;
	IncommingMisslieDetectionSystem = 16;
 	minFireTime = 10;
 	driverAction = "fz_f18_pilot";
 	driverCanSee = 1+2+4;
 	driverIsCommander = true;
	canLock = 2;
 	gunAimDown = 0.07;
 	hasGunner = true;

 		transportSoldier=1;
 		primaryGunner = true;
 		primaryObserver = true;
 		gunnerOpticsShowCursor = 1;
 		showgunneroptics = 1;		
 		brakeDistance= 500; // plane
 		fuelCapacity = 1000; // air
 		precision = 200; // air
 		acceleration = 100;
 		lightongear = true;
 		maxSpeed = 1300;
 		canBeShot = true;
 		armor = 60;
 		armorStructural= 4.0; //ranges between 1 and 4.0, default 1
 		armorFuel = 1.4; // default
 		armorGlass = 0.5; // default
 		armorLights = 0.4; // default 0.4 in all models.
 		armorWheels = 0.05;//default
 		armorHull = 0.5;
 		armorEngine = 0.6;
 		armorAvionics = 1.4;
 		armorVRotor = 0.5;
 		armorHRotor = 0.7;
 		armorMissiles = 1.6;
 		damageResistance = 0.01246;
 		armorStructured = 1; 
 		formationX = 40;
 		formationZ = 50;
 		ejectDamageLimit = 0.75;
 		aileronSensitivity = 1.6;
 		elevatorSensitivity = 1;
 		wheelSteeringSensitivity = 3.0;
 		flapsFrictionCoef = 0.5;
 		minHeadTurnAI = -140;
 		maxHeadTurnAI = 140;  		
 		leftDustEffect = "LDustEffects";
 		rightDustEffect = "RDustEffects"; 		
 		cost = 10000000;// an air vehicle is typically this value
 		type = "VAir";
 		threat[] = {1,1,0.7};
 		landingAoa = "rad 10";
 		landingSpeed = 300;

Could the problem be with one of the planes LOD's?

Share this post


Link to post
Share on other sites

How are you going to shoot a heat-seeking missile at a parked plane?

Share this post


Link to post
Share on other sites
How are you going to shoot a heat-seeking missile at a parked plane?

I did this after I had flown over them... to test to see if they are even recognizing the plane as an enemy...

And what about the Tunguska.. why did it not fire?

Share this post


Link to post
Share on other sites

type = "VAir";

Do you have a corresponding #define for VAir? Also remove the "" for testing.

Alternatively:

type = 2;

Share this post


Link to post
Share on other sites
Myke;1990263']
type = "VAir";

Do you have a corresponding #define for VAir? Also remove the "" for testing.

Alternatively:

type = 2;

I tried both

type = VAir;

and

type = 2;

I do have #define VAir 2.

I placed an A10 next to it and they attacked the A10?????

Any other suggestions?

Share this post


Link to post
Share on other sites

A getnumber query i tried in the editor about the value of "type" gave me type = 0 which defines it as soft target. Any chance to see the complete config? Somewhere is something messed and only seeing partial config doesn't really help.

hintsilent format ["%1", getNumber (configFile >> "cfgVehicles" >> (typeof this) >> "type")]

This in the initline of the F/A-18 will give the value.

Share this post


Link to post
Share on other sites

do you have the memory point "zamerny" thats what the AI target.

Share this post


Link to post
Share on other sites
do you have the memory point "zamerny" thats what the AI target.

Thanks. I do have a memory point named "zamerny"... (I got really excited and thought that you had solved the problem)

... so that is not the problem. How about LOD's.. am I missing any:

I have:

1.000

4.000

8.000

12.000

20.000

View-Pilot

View-Cargo

ShadowVolume 0.000

Geometry

LandContact

Hit-Points

View-Geometry

Fire Geometry

Could it possibly be something in my model.cfg?

http://pastebin.com/UQB93M4j

---------- Post added at 10:53 PM ---------- Previous post was at 10:41 PM ----------

Myke;1990880']A getnumber query i tried in the editor about the value of "type" gave me type = 0 which defines it as soft target. Any chance to see the complete config? Somewhere is something messed and only seeing partial config doesn't really help.

hintsilent format ["%1", getNumber (configFile >> "cfgVehicles" >> (typeof this) >> "type")]

This in the initline of the F/A-18 will give the value.

I placed that in the init line and got a value of "2"

Edited by Meatball0311

Share this post


Link to post
Share on other sites

Make your plane based on an existing plane class from BI.

Like "class fz_f18f_aws: F35B".

Next remove all duplicate code as its defined in the F35B or F35_base anyway.

This leaves you with only different key-value pairs.

This is a much cleaner and more meaningful way to use inheritance.

If it is a config issue, it will be resolved by this approach or at least it will show up

in the remaining key-value pairs.

Share this post


Link to post
Share on other sites

I dont know if I am doing this right.. but it is still not working:

class CfgVehicles {
	class Air;

class Plane: Air {};

class F35B : Plane {
	class NewTurret;        // External class reference 
           class EventHandlers;
     };

	class fz_f18abase : F35B {
           //scope = 0;
	side = 1;
	displayName = "F/A-18";
           faction = "2nd_MAW";
           accuracy = 0.5;
     }; 	

	class fz_f18f_aws : fz_f18abase {
 	destrType = "DestructWreck";
 	scope = 2;
 	side = 1;
 	vtol = 0;
 	displayName = "F/A-18F Super Hornet 01(USMC)";
 	vehicleclass = "MAR_FA18F";
 	model = "\fz_f18\fz_f18f_aws";
 	picture = "\fz_f18\fa18_pic.paa";
 	icon = "\fz_f18\fa18_icon.paa";
 	mapSize = 17;
 	faction = "2nd_MAW";
 	crew = "mar_fighter_pilot";
 	camouflage = 12;
 	audible = 12;
 	accuracy = 0.2;
 	supplyRadius = 8;
 	radarType = 4;
 	laserScanner = 1;
 	laserTarget = 1;
 	irScanGround = 1;
 		irScanRangeMin = 4000;
 		irScanRangeMax = 10000;
 		irScanToEyeFactor = 2;
 		LockDetectionSystem = 8 + 4;
	IncommingMisslieDetectionSystem = 16;
 	minFireTime = 10;
 	driverAction = "fz_f18_pilot";
 	driverCanSee = 1+2+4;
 	driverIsCommander = true;
	//commanderCanSee = 1+2+4;
 	gunAimDown = 0.07;
 	hasGunner = true;
 		//hasCommander = true;
 		transportSoldier=1;
 		primaryGunner = true;
 		primaryObserver = true;
 		gunnerOpticsShowCursor = 1;
 		showgunneroptics = 1;		
 		brakeDistance= 500; // plane
 		fuelCapacity = 1000; // air
 		precision = 200; // air
 		acceleration = 100;
 		lightongear = true;
 		maxSpeed = 1300;
 		canBeShot = true;
 		armor = 60;
 		armorStructural= 4.0; //ranges between 1 and 4.0, default 1
 		armorFuel = 1.4; // default
 		armorGlass = 0.5; // default
 		armorLights = 0.4; // default 0.4 in all models.
 		armorWheels = 0.05;//default
 		armorHull = 0.5;
 		armorEngine = 0.6;
 		armorAvionics = 1.4;
 		armorVRotor = 0.5;
 		armorHRotor = 0.7;
 		armorMissiles = 1.6;
 		damageResistance = 0.01246;
 		armorStructured = 1; 
 		formationX = 40;
 		formationZ = 50;
 		ejectDamageLimit = 0.75;
 		aileronSensitivity = 1.6;
 		elevatorSensitivity = 1;
 		wheelSteeringSensitivity = 3.0;
 		flapsFrictionCoef = 0.5;
 		minHeadTurnAI = -140;
 		maxHeadTurnAI = 140;  		
 		leftDustEffect = "LDustEffects";
 		rightDustEffect = "RDustEffects"; 		
 		cost = 20000000;
 		type = 2;
 		threat[] = {1,1,0.7};
 		landingAoa = "rad 10";
 		landingSpeed = 300;

Edited by Meatball0311

Share this post


Link to post
Share on other sites

please post your FULL config

Share this post


Link to post
Share on other sites

thanks

here is at least a proper formatted and working config (yours had various errors):

http://pastebin.jonasscholz.de/1517

Your requiredAddons section is probably still incomplete.

Did you write the full config?

Share this post


Link to post
Share on other sites
thanks

here is at least a proper formatted and working config (yours had various errors):

http://pastebin.jonasscholz.de/1517

Your requiredAddons section is probably still incomplete.

Did you write the full config?

I did the best as I could by looking at other examples...

---------- Post added at 01:33 AM ---------- Previous post was at 01:30 AM ----------

I am checking it out right now... Thanks!

---------- Post added at 01:42 AM ---------- Previous post was at 01:33 AM ----------

It still is not working.... man it is the strangest thing. I start the mission and my WSO will call out "Enemy" then the OPFOR just either lays down or runs off. Nothing.. not shooting or anything. As soon as I get out of the vehicle, they start shooting at me???? I have no idea??

Share this post


Link to post
Share on other sites

The question was not meant offensive Meatball0311.

It is more the notion that you have a very large and complex config there.

This is why it is better to use BI units as a base and only define differences.

Much smaller and easy to understand config.

In any case your problem might be a too high cost value:

cost = 20000000;

Share this post


Link to post
Share on other sites
The question was not meant offensive Meatball0311.

It is more the notion that you have a very large and complex config there.

This is why it is better to use BI units as a base and only define differences.

Much smaller and easy to understand config.

In any case your problem might be a too high cost value:

I apologize if it sounded as I was offended, because I am not. Thank you for your time in helping me.

I will try lowering value to 10000000

Share this post


Link to post
Share on other sites

Here is the unit class somewhat reduced:

http://pastebin.jonasscholz.de/1518

(duplicates removed when using F35B as a base)

---------- Post added at 09:58 ---------- Previous post was at 09:55 ----------

If nothing helps, my approach would be to start with a very simple config and add your

code into it step by step.

This way you can see when the problem starts to appear and narrow it down.

So for example you start with just swapping the model of the F35.

Share this post


Link to post
Share on other sites

Lowered value.. still nothing.

---------- Post added at 02:16 AM ---------- Previous post was at 01:59 AM ----------

Ah ha!!!!! I think we are on to something! They now blow me up!! I think this may be resolved.

What I did was removed everything except some key config parts.. and it worked. Now I am going to see what I need and dont need. Thanks for you help.. I will post final config when I get it complete! Thanks!

Share this post


Link to post
Share on other sites

nice to hear mate

Share this post


Link to post
Share on other sites

Yes, thank you PVPscene! The problem was I had

laserTarget = 1;

took that out and everything is working fine.

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
Sign in to follow this  

×