Addons & Mods Depot > Arma2 - Configs & Scripting
Vehicle config problem (Turrets & scope)
Wolfrug:
Hello all,
I've got a bit of a problem with a vehicle config. It's a real simple one: replace the default weapons of a vehicle with my own weapons (which I've defined elsewhere and which work - tested ingame using addweapon). Here's the config, a part of cfgVehicles:
--- Code: ---class BRDM2_Base;
class Turrets;
class MainTurret;
class RUG_HD_BRDM2_CDF2 : BRDM2_Base
{
faction = "RUG_HD_CDF";
scope = 2;
side = 1;
displayName = "CDF HD BRDM2";
crew = "RUG_HD_CDF_Soldier_Crew";
class Turrets : Turrets
{
class MainTurret : MainTurret {
weapons[] = {"RUG_HD_KPVT","RUG_HD_PKT" };
magazines[] = {"500Rnd_145x115_KPVT","1500Rnd_762x54_PKT" };
};
};
};
--- End code ---
The "Turrets" and "MainTurret" classes are there to avoid the "undefined base class" error that will prevent Arma 2 from starting. Anyway, once the game loads, I get the following error:
--- Quote ---No entry "bin\config.bin/CfgVehicles/Turrets.scope".
--- End quote ---
The unit shows up in-game in its proper faction etc (the above error repeats itself whenever I click to add a new unit), but when I place it and then try to preview, the following error appears:
--- Quote ---No entry "bin\config.bin/CfgVehicles/RUG_HD_BRDM2_CDF2/Turrets/MainTurret/selectionFireAnim."
--- End quote ---
I believe this means that the config, as it stands, is simply incomplete. What I want to know now is whether or not I am actually going to have to include the -whole goddamned vehicle config- to be able to change this one thing (namely the weapons)? Please note I have tried changing the RUG_HD_ weapons to their regular counterparts, but the same errors occur.
At the moment, I'm considering simply using a script to exchange the weapons, but the problem then is that none of the animations follow - this is especially noticeable on the static weapons which have simulated recoil and reload animations, which won't work the same if the weapon has just been added with a script. This in turn makes me wonder if it is at all possible to change the weapons in this way, or if the weapons are integrated with the vehicle on a model-level somehow, meaning I'd have to use a replacement config (which is not an option - and neither is obviously adding the whole of air.pbo, wheeled.pbo and so forth to my addon :P).
Thoughts? Note: the above IS the entire config, as it stands, as it is. Replace RUG_HD_PKT/KPVT with just the regular "PKT" and "KPVT" & remove the custom crew/faction, and then try running it - nothing changes.
Thanks!
Wolfrug out.
Planck:
Try this snippet:
--- Code: ---class CfgVehicles
{
class Land;
class LandVehicle: Land
{
class NewTurret;
};
class Car: LandVehicle
{
class Turrets;
};
class BRDM2_Base;
class RUG_HD_BRDM2_CDF2 : BRDM2_Base
{
faction = "RUG_HD_CDF";
scope = 2;
side = 1;
displayName = "CDF HD BRDM2";
crew = "RUG_HD_CDF_Soldier_Crew";
class Turrets: Turrets
{
class MainTurret: MainTurret
{
weapons[] = {"RUG_HD_KPVT","RUG_HD_PKT" };
magazines[] = {"500Rnd_145x115_KPVT","1500Rnd_762x54_PKT" };
};
};
};
};
--- End code ---
The 'selectionFireAnim' is part of CfgWeapons -- class Default definition, do you have 'class Default;' at the start of your CfgWeapons section?
Planck
Wolfrug:
Hey,
Sadly, nothing changed. I had to add class Turrets; and class MainTurret; again, otherwise it complained about missing base class, and once I got in-game the exact same errors popped up. So no dice. :confused:
I suppose I could just copy the whole BRDM2 config over, get it working, and then start removing stuff that isn't necessary. :dry:
Thank you anyway! Oh, and I do have a class Default; in my weapons config!
Wolfrug out.
Planck:
You do have your cfgpatches section as well?
Planck
kju:
Please post your complete config in pastebin.
http://pastebin.jonasscholz.de
You know the RPT right?
http://community.bistudio.com/wiki/arma.RPT
Navigation
[0] Message Index
[#] Next page
Go to full version