Announcement

Collapse
No announcement yet.

Another vehicle problem

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Another vehicle problem

    How can I make a flying vehicle (an airplane?) that can't stop flying (so it's not a helicopter!). In another words: how can I make it fly constantly when player goes in and pushes forward?

    (BTW, I have everything set up... I just need help with coding this above )

    #2
    You could use tick to push it, or you could base it off of ONSPlaneCraft (whci is very buggy)

    Comment


      #3
      I'll be watching this thread myself as I have ideas for a true airplane myself. I also want to eventually do a "AV-8B Harrier" style vehicle with controllable VTOL capability.

      Comment


        #4
        In the vehicle's KApplyForce function, you can add force (and torque) to it. If you angle the force in the direction of its velocity, it'll gain forward speed.

        Comment


          #5
          Thank you all. So far I disabled couple of functions (like strafe... So it will not strafe) but I ran into a silly problem.

          I modified some value/property and now when I get into the airplane it crashes REALLY REALLY fast with objects... Since the spawn points are by couple of objects there's no way I can start the thing and fly.

          Any of these are... Too big or too small? Forgot what I did :bulb:

          bDrawDriverInTP=False
          bDrawMeshInFP=False
          bTurnInPlace=False
          bCanStrafe=False

          UprightStiffness=1000
          UprightDamping=500

          MaxThrustForce=40.0
          LongDamping=500

          MaxStrafeForce=0
          LatDamping=0.02

          MaxRiseForce=13
          UpDamping=0.01

          TurnTorqueFactor=500.0
          TurnTorqueMax=500.0
          TurnDamping=100.0
          MaxYawRate=1.5

          PitchTorqueFactor=200.0
          PitchTorqueMax=35.0
          PitchDamping=20.0

          RollTorqueTurnFactor=200.0
          RollTorqueStrafeFactor=50.0
          RollTorqueMax=50.0
          RollDamping=30.0

          MaxRandForce=3.0
          RandForceInterval=0.75

          StopThreshold=100
          VehicleMass=40.0

          EntryPosition=(X=-40,Y=0,Z=0)
          EntryRadius=210.0

          Comment


            #6
            Nevermind... I fixed it by lowering the LongDamping... 500 is way too big for that one lol.

            Comment


              #7
              Anyways, I set up the camera so it's about 80 degrees up above it (so you can see who you're bombing )... It also flies great, too but I still didn't figure out how I'd use the tick command to make it fly constantly. Can anyone help?

              I also tried extending it from ONSPlaneCraft but... It didn't seem to work much :P Is that what you meant by buggy?

              Thanks!

              Comment


                #8
                AS-SpaceFighter

                The OnsPlaneCraft is not so mutch buggy as it is incomplet.
                Ive made a working plane(SpitFire) out of the AS-SpaceFighter.
                Works great, flys just like a plane and eavin has roll and stuff.
                The only problem is its not combatable with ONS besides summoning it. You will need to make your own ONS factory class or somthin (base it off Assault factory or somthin).

                Comment


                  #9
                  You can use the tick command with kapplyforce, where the force you apply is Velocity I believe, which is what is changed as you speed up and slow down, so, just make sure you'r always applying a certain minimum speed...

                  Comment


                    #10
                    What's his name, made BattleBikes and 2 other mods: one for Armor, one for Aircraft. I just got it today. After testing his "jetfighters" it is readily apparent, he based his code from the AS-SpaceFighter code. Beside being VERY sluggish with mouse control, it works the treat. A mut is no problem. Just look at someone elses and fix it to your classesholdingfolder.nameoftheuc

                    eventually I will be making a "jet" aircraft. But not yet. I'm still working on my Predator. But I will use the AS-SF code, unless someone (you) comes up with a nice fixed-wing aircraft code

                    I'm really **** at times and I may even try to fix the ONSPlaneCraft code...but don't hold your breath. I'm a helo junkie...

                    Comment


                      #11
                      Originally posted by Hsoolien
                      You can use the tick command with kapplyforce
                      KApplyForce seems to tick all of its own. The ONSHoverCraft code actually depends on that. Maybe that's ONSHoverCraft specific for some dark reason, though. There sure is some weird stuff going on in some native classes...

                      Comment


                        #12
                        All right. I'm pretty much done with the basic idea, I got the bombs to work and drop on people (lol, DYNAMITE!). I still have a different problem though. I can't change the left-click to the bomb. I tried chaning both projectile classes to my own 'BomberCraftMissle' but when I compile everything it works only for the right mouse button. Any ideas? Thanks.

                        No... I didn't do the constant flying thing
                        //-----------------------------------------------------------
                        //
                        //-----------------------------------------------------------
                        class BomberCraftGun extends ONSAttackCraftGun;

                        #exec OBJ LOAD FILE=..\Animations\ONSWeapons-A.ukx


                        DefaultProperties
                        {
                        YawBone=PlasmaGunBarrel
                        YawStartConstraint=0
                        YawEndConstraint=65535
                        PitchBone=PlasmaGunBarrel
                        PitchUpLimit=18000
                        PitchDownLimit=49153
                        FireSoundClass=sound'ONSVehicleSounds-S.LaserSounds.Laser01'
                        AltFireSoundClass=sound'ONSVehicleSounds-S.AVRiL.AVRiLFire01'
                        FireForce="Laser01"
                        AltFireForce="Laser01"
                        ProjectileClass=class'BomberCraftMissle'
                        TeamProjectileClasses(0)=class'ONSAttackCraftPlasm aProjectileRed'
                        TeamProjectileClasses(1)=class'ONSAttackCraftPlasm aProjectileBlue'
                        FireInterval=0.2
                        AltFireProjectileClass=class'BomberCraftMissle'
                        AltFireInterval=.2
                        WeaponFireAttachmentBone=PlasmaGunBarrel
                        WeaponFireOffset=0.0
                        bAimable=True
                        RotationsPerSecond=.1
                        DualFireOffset=50
                        AIInfo(0)=(bLeadTarget=true,RefireRate=0.95)
                        AIInfo(1)=(bLeadTarget=true,AimError=400,RefireRat e=0.50)
                        MinAim=0.900
                        }

                        Comment

                        Working...
                        X