Hello
This is my first post in the addons section of the forums, and I'm a bit embarassed about the simplicity of the problem I'm having. Truth be told I know next to nothing about addon editing
What I am trying to do is make the AI target inanimate objects. Tomb previously managed to get the AI to target the rifle range target, but unfortunately he has lost his work. He did give me a great start with his cpp file (below) that tricks west AI into thinking the target is a UAZ, and I have worked out that the east side will target a 5t refuel truck in the same way.
All good so far, but there a a couple of problems:
- Despite trying to make the AI call the object 'target' they still call it 'UAZ'. Why isn't namesound working. The target also shows up as 'UAZ' in the extended HUD. Is this fixable?
- LAW soldiers thinks its great fun to unleash their full payload into the target, but I would prefer if they engaged with guns only. How can I decide what weapons the AI will engage the target with?
Here's Tombs cpp file ( cheers mate
)
class CfgPatches
{
class BRM_Target
{
units[]={BRM_Target};
weapons[]={};
requiredVersion=1.460000000;
};
};
class CfgVehicles
{
class All{};
class AllVehicles: All{};
class Land: AllVehicles{};
class LandVehicle: Land{};
class Car: LandVehicle{};
class UAZ: Car{};
class BRM_Target: UAZ
{
nameSound="Target";
scope=2;
hasDriver=0;
side=1;
displayName="Target (West)";
simulation="House"; // same as below
coefInside=2; // fools the game engine to think that it really IS a d**n building!
coefInsideHeur=4.300000;
vehicleClass=Objects;
model="\imb_target\target";
picture="ivojak";
icon="unknown_object";
mapSize=0.4000;
type=0;
threat[]={0.00, 0.00, 0.00};
destrType=DestructTree;
canSmoke=0;
accuracy=1000;
transportSoldier=0;
transportMaxMagazines=0;
transportMaxWeapons=0;
fuelCapacity=0;
maxSpeed=0.000;
cost=1000;
armor=1000;
soundEngine[]={"",0,1};
soundEnviron[]={"",0,1};
};
};
Any help would be much appreciated. Also is there a definitive list of cpp commands? I found a couple of tutorials on cpps but the seemed a bit threadbare.
Cheers
Ian