nephilim 0 Posted November 23, 2004 <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">//USCM APC by manticore aka nephilim #define TEast 0 #define TWest 1 #define TGuerrila 2 #define TCivilian 3 #define TSideUnknown 4 #define TEnemy 5 #define TFriendly 6 #define TLogic 7 #define true 1 #define false 0 #define private 0 #define protected 1 #define public 2 class CfgPatches { class M577_A1 { units[] = {M577_A1}; weapons[] = {}; requiredVersion = 1.75; }; }; class CfgModels { class Default { sections[] = {}; sectionsInherit = ""; }; class Land: Default {}; class LandVehicle: Land {}; class Car: LandVehicle {}; class Jeep: Car{}; class JeepMG: Jeep{}; class M577_A1: JeepMG { sectionsInherit="Vehicle"; sections[]={"tur1",tur2"}; }; }; class CfgVehicles { class All {}; class AllVehicles: All {}; class Land: AllVehicles {}; class LandVehicle: Land {}; class Car: LandVehicle {}; class Jeep: Car{}; class JeepMG: Jeep{}; class M577_A1: JeepMG { scope=public; crew=Civilian2; driverIsCommander=true; transportSoldier = 10; driverCanSee=CanSeeAll; getInRadius=10; maxSpeed=150; hiddenselections[]={"tur2"}; side=TWest; vehicleClass="USCM - Vehicles"; displayName=M577 A1 APC; brakeDistance=3; class Reflectors { class Left { color[]={0.900000,0.800000,0.600000,1.000000}; ambient[]={0.100000,0.100000,0.100000,1.000000}; position="L svetlo"; direction="konec L svetla"; hitpoint="L svetlo"; selection="L svetlo"; size=0.500000; brightness=1.000000; }; class Right { color[]={0.900000,0.800000,0.600000,1.000000}; ambient[]={0.100000,0.100000,0.100000,1.000000}; position="P svetlo"; direction="konec P svetla"; hitpoint="P svetlo"; selection="P svetlo"; size=0.500000; brightness=1.000000; }; }; sensitivity=0.600000; animated=1; class Animations { class driverdooranim { type="rotation"; animPeriod=1; selection="driverdoor"; axis="driverdoor_axis"; angle0=0; angle1=-1.92; }; class maindooranim { type="rotation"; animPeriod=1; selection="maindoor"; axis="maindoor_axis"; angle0=0; angle1=0.016; }; class mainturretanim1 { type="rotation"; animPeriod=5; selection="tur1"; axis="back_turret_1_axis"; angle0=0; angle1=rad 90; }; class maiturretanim2 { type="rotation"; animPeriod=5; selection="tur2_anim"; axis="back_turret_2_axis"; angle0=0; angle1=rad 90; }; }; class UserActions { class open_maindoor { displayName="Open Maindoor"; position="pos cargo"; radius=1.000000; condition="this animationPhase ""maindooranim"" < 0.5"; statement="this animate [""maindooranim"", 1]"; }; class close_maindoor { displayName="Close Maindoor"; position="pos cargo"; radius=1.000000; condition="this animationPhase ""maindooranim"" >= 0.5"; statement="this animate [""maindooranim"", 0]"; }; class open_driverdoor { displayName="Open Driverdoor"; position="pos driver"; radius=1.000000; condition="this animationPhase ""driverdooranim"" < 0.5"; statement="this animate [""driverdooranim"", 1]"; }; class close_driverdoor { displayName="Close Driverdoor"; position="pos driver"; radius=1.000000; condition="this animationPhase ""driverdooranim"" >= 0.5"; statement="this animate [""driverdooranim"", 0]"; }; }; armor=100; accuracy=0.80; fuelCapacity=100; model="\uscm_m577\M577_A1.p3d"; type=VArmor; cost=100000; terrainCoef=0.200000; wheelCircumference=4.513; turnCoef=8.0; armorWheels=0.800000; weapons[]={SportCarHorn}; magazines[]={}; soundEnviron[]={Vehicles\OldRolling_Treads1,db-10,0.7}; soundEngine[]={Vehicles\dieseltruckloop2,db-20,1}; soundCrash[]={Vehicles\crash_small2,db-10,1}; soundGear[]={Vehicles\Gear_Trans1,db-40,1}; soundDammage[]={Objects\alarm_loop1,db-40,1}; attendant = true; transportAmmo = 1; transportMaxMagazines = 100; transportMaxWeapons = 25; }; }; class All{}; class AllVehicles: All{}; class Land: AllVehicles{}; class Man: Land{}; class Soldier: Man{}; class SoldierWB: Soldier{}; class vag_APCfake: SoldierWB { displayName="APC"; nameSound="apc"; model="\vag_apc\apc_fake"; vehicleClass=""; scope=1; side=TWest; cost=100000 sensitivity=1.25; accuracy=2.500000; armor=5; armorStructural=2.0; armorHead=0.7; armorBody=5.5; armorHands=0.5; armorLegs=0.5; weapons[]={}; magazines[]={}; animated=1; }; }; ive added a cfgmodel to it but when i did that the apc wasnt in the list any more... i´d be glad if someone coudl fix this Share this post Link to post Share on other sites
Planck 1 Posted November 23, 2004 Only had a quick scan atm, but shouldn't the cfgPatches be: class uscm_m577 Planck Share this post Link to post Share on other sites
oyman 0 Posted November 23, 2004 try taking a }; away from the cfg models part so it should look like this <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE"> class CfgModels { class Default { sections[] = {}; sectionsInherit = ""; }; class Land: Default {}; class LandVehicle: Land {}; class Car: LandVehicle {}; class Jeep: Car{}; class JeepMG: Jeep{}; class M577_A1: JeepMG { sectionsInherit="Vehicle"; sections[]={"tur1",tur2"}; }; Share this post Link to post Share on other sites
nephilim 0 Posted November 24, 2004 ok thx i ll try that one but isnt the 2d }; actually supposed to close the cfg models? @ planck why uscm_m577?? it the pbo name and as i wnat to use the setobejcttexture thingy the class names and the p3d names have to be the same right? Share this post Link to post Share on other sites
nephilim 0 Posted November 24, 2004 ok when i leave away the last }; i get this error message Quote[/b] ]uscm_m577\config.cpp/CfgModels.Land : Member already defined... not wots wrong here....... Share this post Link to post Share on other sites
Planck 1 Posted November 25, 2004 Hello nephilim It was always my understanding that the cfgPatches section had the following structure: class CfgPatches { class NameOfYourPBO { units[] = {UnitClassName}; weapons[] = {}; requiredVersion = 1.75; }; }; Your PBO seems to be named uscm_m577, as I deduced from this line: model="\uscm_m577\M577_A1.p3d"; Hence the reason I suggested you try changing it accordingly. This would make your cfgPatches like so: class CfgPatches { class uscm_m577 { units[] = {M577_A1}; weapons[] = {}; requiredVersion = 1.75; }; }; Hope this helps Planck Share this post Link to post Share on other sites
nephilim 0 Posted November 25, 2004 ah ok i got it it try that one nope didnt work still the same error as i mentioned above theres sth wrong with the cfg models..... Share this post Link to post Share on other sites
philcommando 0 Posted November 25, 2004 look under:- 1. Your first cfgVehicle class:- attendant = true; transportAmmo = 1; transportMaxMagazines = 100; transportMaxWeapons = 25; }; }; <---------this is extra closing. ofp technically will stop reading but as there are extra text after this 'closing' it confuses the whole cpp. 2. In your first cfgVehicle u already defined:- Â Â Â class All{}; Â Â Â class AllVehicles: All{}; Â Â Â class Land: AllVehicles{}; therefore u have no need to duplicate it for the 2nd vehicle(man) in the cpp Solution:- ---------- 1. leave out the array bracket 2. leave out lines:- Â Â Â class All{}; Â Â Â class AllVehicles: All{}; Â Â Â class Land: AllVehicles{}; for your second unit config in the cpp. Hope it helps PS:..there is a structured way to write the cfgModels section and its not the same manner like in the cfgVehicle style. class CfgModels { class Default { sections[] = {}; sectionsInherit = ""; }; class Vehicle: Default{}; class JeepMG: Vehicle { sectionsInherit="Vehicle"; sections[]={"tur1",tur2"}; }; class M577_A1: JeepMG{}; }; Share this post Link to post Share on other sites
nephilim 0 Posted November 25, 2004 ok well ive tried ur stuff and its ingame.. but i still cant select it in hte mission editor...... <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE"> //USCM APC by manticore #define TEast 0 #define TWest 1 #define TGuerrila 2 #define TCivilian 3 #define TSideUnknown 4 #define TEnemy 5 #define TFriendly 6 #define TLogic 7 #define true 1 #define false 0 #define private 0 #define protected 1 #define public 2 class CfgPatches { class uscm_m577 { units[] = {M577_A1}; weapons[] = {}; requiredVersion = 1.90; }; }; class CfgModels { class Default { sections[] = {}; sectionsInherit = ""; }; class Land: Default {}; class LandVehicle: Land {}; class Car: LandVehicle {}; class Jeep: Car{}; class JeepMG: Jeep{}; class M577_A1: JeepMG { sectionsInherit="Vehicle"; sections[]={"tur1",tur2"}; }; class CfgVehicles { class All {}; class AllVehicles: All {}; class Land: AllVehicles {}; class LandVehicle: Land {}; class Car: LandVehicle {}; class Jeep: Car{}; class JeepMG: Jeep{}; class M577_A1: JeepMG { scope=public; crew=Civilian2; driverIsCommander=true; transportSoldier = 10; driverCanSee=CanSeeAll; getInRadius=10; maxSpeed=150; side=TWest; vehicleClass="USCM - Vehicles"; displayName=M577 A1 APC; brakeDistance=3; class Reflectors { class Left { color[]={0.900000,0.800000,0.600000,1.000000}; ambient[]={0.100000,0.100000,0.100000,1.000000}; position="L svetlo"; direction="konec L svetla"; hitpoint="L svetlo"; selection="L svetlo"; size=0.500000; brightness=1.000000; }; class Right { color[]={0.900000,0.800000,0.600000,1.000000}; ambient[]={0.100000,0.100000,0.100000,1.000000}; position="P svetlo"; direction="konec P svetla"; hitpoint="P svetlo"; selection="P svetlo"; size=0.500000; brightness=1.000000; }; }; sensitivity=0.600000; hiddenselections[]={"tur2"}; animated=1; class Animations { class driverdooranim { type="rotation"; animPeriod=1; selection="driverdoor"; axis="driverdoor_axis"; angle0=0; angle1=-1.92; }; class maindooranim { type="rotation"; animPeriod=1; selection="maindoor"; axis="maindoor_axis"; angle0=0; angle1=0.016; }; class mainturretanim1 { type="rotation"; animPeriod=5; selection="tur1"; axis="back_turret_1_axis"; angle0=0; angle1=rad 90; }; class mainturretanim2 { type="rotation"; animPeriod=5; selection="tur2_anim"; axis="back_turret_2_axis"; angle0=0; angle1=rad 90; }; }; class UserActions { class open_maindoor { displayName="Open Maindoor"; position="pos cargo"; radius=1.000000; condition="this animationPhase ""maindooranim"" < 0.5"; statement="this animate [""maindooranim"", 1]"; }; class close_maindoor { displayName="Close Maindoor"; position="pos cargo"; radius=1.000000; condition="this animationPhase ""maindooranim"" >= 0.5"; statement="this animate [""maindooranim"", 0]"; }; class open_driverdoor { displayName="Open Driverdoor"; position="pos driver"; radius=1.000000; condition="this animationPhase ""driverdooranim"" < 0.5"; statement="this animate [""driverdooranim"", 1]"; }; class close_driverdoor { displayName="Close Driverdoor"; position="pos driver"; radius=1.000000; condition="this animationPhase ""driverdooranim"" >= 0.5"; statement="this animate [""driverdooranim"", 0]"; }; }; armor=100; accuracy=0.80; fuelCapacity=100; model="\uscm_m577\M577_A1"; type=VArmor; cost=100000; terrainCoef=0.200000; wheelCircumference=4.513; turnCoef=8.0; armorWheels=0.800000; weapons[]={SportCarHorn}; magazines[]={}; soundEnviron[]={Vehicles\OldRolling_Treads1,db-10,0.7}; soundEngine[]={Vehicles\dieseltruckloop2,db-20,1}; soundCrash[]={Vehicles\crash_small2,db-10,1}; soundGear[]={Vehicles\Gear_Trans1,db-40,1}; soundDammage[]={Objects\alarm_loop1,db-40,1}; attendant = true; transportAmmo = 1; transportMaxMagazines = 100; transportMaxWeapons = 25; }; class Man: Land{}; class Soldier: Man{}; class SoldierWB: Soldier{}; class vag_APCfake: SoldierWB { displayName="APC"; nameSound="apc"; model="\uscm_m577\apc_fake"; vehicleClass=""; scope=1; side=TWest; cost=100000 sensitivity=1.25; accuracy=2.500000; armor=5; armorStructural=2.0; armorHead=0.7; armorBody=5.5; armorHands=0.5; armorLegs=0.5; weapons[]={}; magazines[]={}; animated=1; }; }; thats how it looks now.... but still doesn work.... Share this post Link to post Share on other sites
Planck 1 Posted November 26, 2004 Hello nephilim Looking at your latest version of this config, two things I notice. 1./ The cfgModels section requires a final }; thus: <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE"> class CfgModels { class Default { sections[] = {}; sectionsInherit = ""; }; class Land: Default {}; class LandVehicle: Land {}; class Car: LandVehicle {}; class Jeep: Car{}; class JeepMG: Jeep{}; class M577_A1: JeepMG { sectionsInherit="Vehicle"; sections[]={"tur1",tur2"}; }; }; 2./ In cfgVehicles.....first model definition.....this line: displayName=M577 A1 APC; should maybe be like so: displayName="M577 A1 APC"; I hope this helps just a little bit, I haven't found any other errors yet, but will keep looking as time permits. Planck Share this post Link to post Share on other sites
philcommando 0 Posted November 26, 2004 OK, hang in there, neph...now i presume u have no problem opening up ofp and no error msg at startup. The problem is that u dont see your addon on in the list in mission editor. 1.) Lets try this:- look at your 1st vehicle's vehicleClass="USCM - Vehicles"; normally we use the standard values such as armor, man, car, etc and very seldom our own values, but it has been done successfully before. Just a test, try giving it one of the standard values first and see if it works:- vehicleClass="amored"; 2. If u look at your second vehicle's vehicle class, i noticed:- vehicleClass=""; err..u're not gonna give it a value so that it will reflect in mission editor? or is this vehicle(man) intended to be the driver for the first vehicle? If so, in the crew = xxx, u must put the value as crew="vag_APCfake", then u can totally leave out the vehicle class =xxx line for the second vehicle . Share this post Link to post Share on other sites
nephilim 0 Posted November 26, 2004 erm the second one is not htat important its just used so that the transport script works with the apc so its not neccessary that it in the list... adn no its not the driver the class name sayis it "fake apc" i want the first one in teh mission editor the m577_a1 i mean it worked before! but when ive put in that cfgmodels it was gone! but anyway ill try that out Share this post Link to post Share on other sites
nephilim 0 Posted November 26, 2004 im gettin desperate... it didnt work ... changed vehicleclassto armored... didnt work i´ve set units[] = {M577_A1}; to units[] = {"M577_A1"}; didnt work i put the dispaly name in brackets... i adde the 2nd bracket in the cfg models... none worked,,, HELP *CRY* Share this post Link to post Share on other sites
philcommando 0 Posted November 26, 2004 1. Try looking at the model instead, did u miss out anything when or if u made any changes? are all the lods in place? 2. Did u write a proper cfgmodel? Share this post Link to post Share on other sites
nephilim 0 Posted November 26, 2004 well no i simpyl just added a 2nd turret to it... i mean jsut copied the older oen to anotehr position,,, biseds this i have nothjign doen with it no idea if this cfg models is correct thats the prob im a noob help me plz.... Edits: SIMPLY WEIRD!!! when i take off te cfg models it works purfectly and i can slect it in the mission editor... with it cant!!! w/o the cfg models it doesnt really matter if the things mentioend are in brackets, quotes or any additional brackets... simply with the cfg models it doesnt appear! wots wrong with this?? Share this post Link to post Share on other sites
Planck 1 Posted November 26, 2004 nephilim Did you try what I suggested in my last post above? To repeat: Quote[/b] ]1./ The cfgModels section requires a final }; thus: Code Sample class CfgModels { class Default { sections[] = {}; sectionsInherit = ""; }; class Land: Default {}; class LandVehicle: Land {}; class Car: LandVehicle {}; class Jeep: Car{}; class JeepMG: Jeep{}; class M577_A1: JeepMG { sectionsInherit="Vehicle"; sections[]={"tur1",tur2"}; }; }; 2./ In cfgVehicles.....first model definition.....this line: displayName=M577 A1 APC; should maybe be like so: displayName="M577 A1 APC"; 'Also another little error I noticed is in class Animations........ <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE"> class mainturretanim2 { type="rotation"; animPeriod=5; selection="tur2_anim"; axis="back_turret_2_axis"; angle0=0; angle1=rad 90; }; The line: selection="tur2_anim"; should maybe be: selection="tur2"; Planck Share this post Link to post Share on other sites
nephilim 0 Posted November 26, 2004 yes it didnt change nothing its still not selectabel even with ur suggestions... Share this post Link to post Share on other sites
Planck 1 Posted November 26, 2004 Can we see your config as it stands right now? Planck Share this post Link to post Share on other sites
nephilim 0 Posted November 26, 2004 here u go <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">//USCM APC by manticore #define TEast 0 #define TWest 1 #define TGuerrila 2 #define TCivilian 3 #define TSideUnknown 4 #define TEnemy 5 #define TFriendly 6 #define TLogic 7 #define true 1 #define false 0 #define private 0 #define protected 1 #define public 2 class CfgPatches { class uscm_m577 { units[] = {"M577_A1"}; weapons[] = {}; requiredVersion = 1.90; }; }; class CfgModels { class Default {}; class Vehicle: Default {}; class M577_A1: Vehicle { sectionsInherit="Vehicle"; sections[]={ "tur1", "tur2" }; }; }; class CfgVehicles { class All {}; class AllVehicles: All {}; class Land: AllVehicles {}; class LandVehicle: Land {}; class Car: LandVehicle {}; class Jeep: Car{}; class JeepMG: Jeep{}; class M577_A1: JeepMG { scope=public; crew=Civilian2; driverIsCommander=true; transportSoldier = 10; driverCanSee=CanSeeAll; getInRadius=10; maxSpeed=150; side=TWest; vehicleClass="USCM - Vehicles"; displayName="M577 A1 APC"; brakeDistance=3; class Reflectors { class Left { color[]={0.900000,0.800000,0.600000,1.000000}; ambient[]={0.100000,0.100000,0.100000,1.000000}; position="L svetlo"; direction="konec L svetla"; hitpoint="L svetlo"; selection="L svetlo"; size=0.500000; brightness=1.000000; }; class Right { color[]={0.900000,0.800000,0.600000,1.000000}; ambient[]={0.100000,0.100000,0.100000,1.000000}; position="P svetlo"; direction="konec P svetla"; hitpoint="P svetlo"; selection="P svetlo"; size=0.500000; brightness=1.000000; }; }; sensitivity=0.600000; hiddenselections[]={"tur2"}; animated=1; class Animations { class driverdooranim { type="rotation"; animPeriod=1; selection="driverdoor"; axis="driverdoor_axis"; angle0=0; angle1=-1.92; }; class maindooranim { type="rotation"; animPeriod=1; selection="maindoor"; axis="maindoor_axis"; angle0=0; angle1=0.016; }; class mainturretanim1 { type="rotation"; animPeriod=5; selection="tur1"; axis="back_turret_1_axis"; angle0=0; angle1=rad 90; }; class mainturretanim2 { type="rotation"; animPeriod=5; selection="tur2_anim"; axis="back_turret_2_axis"; angle0=0; angle1=rad 90; }; }; class UserActions { class open_maindoor { displayName="Open Maindoor"; position="pos cargo"; radius=1.000000; condition="this animationPhase ""maindooranim"" < 0.5"; statement="this animate [""maindooranim"", 1]"; }; class close_maindoor { displayName="Close Maindoor"; position="pos cargo"; radius=1.000000; condition="this animationPhase ""maindooranim"" >= 0.5"; statement="this animate [""maindooranim"", 0]"; }; class open_driverdoor { displayName="Open Driverdoor"; position="pos driver"; radius=1.000000; condition="this animationPhase ""driverdooranim"" < 0.5"; statement="this animate [""driverdooranim"", 1]"; }; class close_driverdoor { displayName="Close Driverdoor"; position="pos driver"; radius=1.000000; condition="this animationPhase ""driverdooranim"" >= 0.5"; statement="this animate [""driverdooranim"", 0]"; }; }; armor=100; accuracy=0.80; fuelCapacity=100; model="\uscm_m577\M577_A1.p3d"; type=VArmor; cost=100000; terrainCoef=0.200000; wheelCircumference=4.513; turnCoef=8.0; armorWheels=0.800000; weapons[]={SportCarHorn}; magazines[]={}; soundEnviron[]={Vehicles\OldRolling_Treads1,db-10,0.7}; soundEngine[]={Vehicles\dieseltruckloop2,db-20,1}; soundCrash[]={Vehicles\crash_small2,db-10,1}; soundGear[]={Vehicles\Gear_Trans1,db-40,1}; soundDammage[]={Objects\alarm_loop1,db-40,1}; attendant = true; transportAmmo = 1; transportMaxMagazines = 100; transportMaxWeapons = 25; }; class Man: Land{}; class Soldier: Man{}; class SoldierWB: Soldier{}; class vag_APCfake: SoldierWB { displayName="APC"; nameSound="apc"; model="\uscm_m577\apc_fake"; vehicleClass=""; scope=1; side=TWest; cost=100000 sensitivity=1.25; accuracy=2.500000; armor=5; armorStructural=2.0; armorHead=0.7; armorBody=5.5; armorHands=0.5; armorLegs=0.5; weapons[]={}; magazines[]={}; animated=1; }; }; the 2nd bracket isnt there i know but i can leave it out or put it in doeant change anything... Share this post Link to post Share on other sites
Planck 1 Posted November 26, 2004 What second bracket? Well anyway the only other things I can think to try atm are: Change your cfgModels section thus: <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE"> class CfgModels { class Default { sections[]={""}; sectionsInherit=""; }; class Land: Default {}; class LandVehicle: Land {}; class Car: LandVehicle {}; class Jeep: Car{}; class JeepMG: Jeep{}; class M577_A1: JeepMG { sectionsInherit="Vehicle"; sections[]={"tur1",tur2"}; }; }; and the last little error I noted above in your Animations section. Planck Share this post Link to post Share on other sites
nephilim 0 Posted November 26, 2004 hmm k.. wots wrong with the anims section? Share this post Link to post Share on other sites
Planck 1 Posted November 26, 2004 I added it to my post.......a couple of posts up....anyway: Quote[/b] ]Also another little error I noticed is in class Animations........ Code Sample class mainturretanim2 { type="rotation"; animPeriod=5; selection="tur2_anim"; axis="back_turret_2_axis"; angle0=0; angle1=rad 90; }; The line: selection="tur2_anim"; should maybe be: selection="tur2"; Planck Share this post Link to post Share on other sites
nephilim 0 Posted November 26, 2004 erm the selection is called tur2_anim.... the hidden selction tur2 hides the wohle turret tur2_anim is only for moving the turret without the turret base Share this post Link to post Share on other sites
Planck 1 Posted November 26, 2004 Ok.......I understand that. I only said maybe, because I don't know the model. I'll scan the config again, but I can't see anything obvious yet. Planck Share this post Link to post Share on other sites
KJAM 0 Posted November 27, 2004 *pets Neph* dont worry you got the best guys you can ask in scriptign right here, it will get done one way or another *mussters mosquitoes* Share this post Link to post Share on other sites