DRa1N 0 Posted June 4, 2003 hey fellas i'm trying to get a custom towing script working and it doesn't want to.... the plane is the item to be towed and a tractor is towing it #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 // CfgPatches ////////////////////////// class CfgPatches { class firstplane { units[] = {firstplane}; weapons[] = {}; requiredVersion = 1.90; }; }; // CfgModels ///////////////////////////// class CfgModels { class Default {}; class vehicle: default {}; class firstplane: vehicle { sectionsInherit="Vehicle"; sections[]={"vrtule staticka","vrtule blur"}; }; }; // CfgVehicles ////////////////////////////// class CfgVehicles { class All {}; class AllVehicles: All {}; class Air: AllVehicles {}; class Plane: Air {}; class A10: Plane {}; class firstplane: A10 { scope=public; side=TWest; displayName="My first plane"; model="\firstplane\firstplane"; accuracy=0.30; gearRetracting = true; nameSound="plane"; soundEngine[]={"Vehicles\plane",db-10,1}; // Cessna sound soundEnviron[]={"Objects\noise",db-60,1.0}; // Cessna sound soundServo[]={"Vehicles\gun_elevate",db-40,0.4}; // Cessna sound maneuvrability=50.0; maxSpeed=450; armor=100; aileronSensitivity = .8; // relative aileron sensitivity elevatorSensitivity = .8; // relative elevator sensitivity noseDownCoef = .3; // how much goes nose down during turns landingAoa = 10*3.1415/180; brakeDistance=300; // vehicle movement precision steerAheadSimul=1.0; steerAheadPlan=2.0; transportSoldier=1; crew = "SoldierWPilot"; driverAction = ManActUH60Pilot; extCameraPosition[]={0,3,-15}; // 0,5,-30 is standard Air class // Radar stuff irTarget=true; irScanRange = 2000; irScanGround = true; // Weapon and ammo weapons[]={}; // none magazines[]={}; // none }; class animations { class gun_rec { type=rotation; animperiod=0.15; selection=gunrec; axis=osa_gunrec; angle0=0; angle1=-0.05; angle2=0; }; class hitch { type=rotation; animperiod=.00001; selection=hitchh; axis=osa hitch; angle0=0; angle1=-1; angle2=0; }; class wheels { type=rotation; animperiod=0.0000001; selection=wheels; axis=osa wheels; angle0=0; angle1=-6.4; }; class useractions { class pakhook { displayName="Hook Pak"; position="hitch"; radius=4; condition="(nearestobject [this, ""GST_Pro""]) distance this < 10 and this animationphase ""hitch"" == 0"; statement="[nearestobject [this, ""GST_Pro""],this,1.9,.19] exec ""\firstplane\towing.sqs"""; }; class pakhookb { displayName="Hook Pak"; position="hitch"; radius=4 condition="(nearestobject [this, ""BMP""]) distance this < 10 and this animationphase ""hitch"" == 0"; statement="[nearestobject [this, ""BMP""],this,2.3,.24] exec ""\firstplane\towing.sqs"""; }; class pakuhook { displayName="UnHook Pak"; position="hitch"; radius=4 condition="this animationphase ""hitch"" != 0"; statement="this animate [""hitch"", 0];this setObjectTexture [1,""\GST_Pak36\pak1.pac""];this setObjectTexture [2,""""]"; }; }; class eventhandlers { init="[_this select 0] exec ""\firstplane\manager.sqs"""; }; }; what am i doing wrong? Share this post Link to post Share on other sites
Guest BratZ Posted June 4, 2003 Did you try backing a BMP near it? I only see the tow features available to a Krupp Protze or a BMP.You need to change one of these to match the tractor's classname:   class useractions        {        class pakhook         {          displayName="Hook Pak";          position="hitch";         radius=4;         condition="(nearestobject [this, ""GST_Pro""]) distance this < 10 and this animationphase ""hitch"" == 0";         statement="[nearestobject [this, ""GST_Pro""],this,1.9,.19] exec ""\firstplane\towing.sqs""";         };             class pakhookb         {          displayName="Hook Pak";          position="hitch";          radius=4          condition="(nearestobject [this, ""BMP""]) distance this < 10 and this animationphase ""hitch"" == 0";          statement="[nearestobject [this, ""BMP""],this,2.3,.24] exec ""\firstplane\towing.sqs""";         };          class pakuhook         {          displayName="UnHook Pak";         position="hitch";          radius=4          condition="this animationphase ""hitch"" != 0";          statement="this animate [""hitch"", 0];this setObjectTexture [1,""\GST_Pak36\pak1.pac""];this setObjectTexture [2,""""]";         }; Example:     class pakhookb         {          displayName="Hook Pak";          position="hitch";          radius=4          condition="(nearestobject [this, ""TractorClass Here""]) distance this < 10 and this animationphase ""hitch"" == 0";          statement="[nearestobject [this, ""TractorClass Here""],this,2.3,.24] exec ""\firstplane\towing.sqs""";         }; Share this post Link to post Share on other sites
Guest BratZ Posted June 5, 2003         class useractions         {         class pakhook         {          displayName="Hook Pak";          position="hitch";         radius=4;         condition="(nearestobject [this, ""firstplane""]) distance this < 10";         statement="[nearestobject [this, ""firstplane""],this,1.9,.19] exec ""\firstplane\towing.sqs""";         };             K after looking at this again, you said you made  a plane this is what is needed. You also do need to make sure you have a selection name on your plane named "hitch" Share this post Link to post Share on other sites