Profile image


226k jamesPLANESii  2.3 years ago
Unlisted No Tags
Auto Credit Based on jamesPLANESii's Basic Quad Bike

This was originally intended to be a really basic bike to be used as a background prop in screenshots, but it turned out a lot better than I expected and I decided to use it as a demonstrater for my engine transmission code... and then I forgot about it until yesterday.

Engine code explaination:

The first thing you must know is thgere are 3 seperate codes that make this work: one for the engine noise, one for the engine power it's self, and one for the gauge (which is basiucally the same as the noise code)

1. The code for the power

I'm explaining this one first because it's the one that the other codes are based off.
First, I'm gonna give you the raw code that you can copy and paste into your vehicle. Whenever I look at it, my brain dies, so if you don't work it out from looking at this, I don't blame you lol

0.1 * ((sin(180 / pi * ( (clamp((GS * (1 / (6))), (Pitch * 0.375), 1) * 2.5)) * 0.8 + 0.2) * clamp01((GS < (6 * Pitch))) * Pitch) + ((sin((180 / pi) * ((GS * (1 / 12)) * 2.5)) * 0.8 + 0.2) * clamp01((GS > (6 * Pitch)) * (GS < (12 * Pitch))) * (Pitch) * (6 / 12) + ((sin((180 / pi) * ((GS * (1 / 18)) * 2.5)) * 0.8 + 0.2) * clamp01((GS > (12 * Pitch)) * (GS < (18 * Pitch))) * (Pitch) * (6 / 18) + ((sin((180 / pi) * ((GS * (1 / 30)) * 2.5)) * 0.8 + 0.2) * clamp01((GS > (18 * Pitch)) * clamp01(GS < 30)) * (Pitch) * (6 / 30) + ((sin(180 / pi * ( (clamp((GS * (1 / (6))), (-Pitch * 0.375), 1) * 2.5)) * 0.8 + 0.2) * clamp01((GS < (6 * -Pitch))) * Pitch)

Now let me seperate it out:

The green one is first gear, the blue ones are the inbetweeny gears, the red one is the final gear, and the orange one is reverse.

As you can see, each gear is it's own seperate code, basically identical to the others with a couple of small adjustments.

Let me break down the code for an inbetweeny gear, since they feature all the aspects for a gear.

Highlighted in salmon is the torque curve. It's basically a sine curve that's been adjusted to look like a standard torque curve. This code is visually a bit of an abomination but eh, it works lol.

Hilighted in yellow is a code that makes the gear activate at a certain speed. Here it activates at 6m/s ground speed, timsed by pitch, so when you have less throttle, it shifts up for eficiency.

Highlighted in orange is a code that makes the gear deactivate at a certain speed. Here it deactivates at 12m/s ground speed, timsed by pitch, so when you have less throttle, it shifts up for eficiency.

Highlighted in purple is the reduction in torque compared to first gear. Basically the maximum speed of first gear divided by the maximum speed of the current gear. In this case 6/12.

The red bits are the torque adjustment points of the gear. The first red bit adjusts the length of the torque curve so it matches the length of the gear. The second one I've already explained.

hopefully that makes some sense to you lol.

Let me hilight the other gears in the same way, and explain the differences from the other gears:

First gear:

The torque curve part of the code looks different because it has to start with some RPM to get going. It also doesn't have a lower speed limit, and it doesn't have a reduced torque multiplier since that would just be 1:1 since it's based off first gear.

Final gear:

This is basically identical to an inbetweeny gear, except the maximum speed doesn't reduce with pitch.


This is identical to first gear, except for these two pitches are turned to negative.

2. Code for engine noises!

Guys I'm miterally dying trying to explain this, so eh. All I'll say for now is the way this works is similar to the power engine, except the individual codes are far simpler, but with a few things that stop them working in reverse (or forward for reverse). Hopefully you can work it out before I can be bothered to write this lol.

General Characteristics

  • Predecessor Basic Quad Bike
  • Created On Windows
  • Wingspan 3.6ft (1.1m)
  • Length 7.2ft (2.2m)
  • Height 5.1ft (1.6m)
  • Empty Weight 752lbs (341kg)
  • Loaded Weight 939lbs (426kg)


  • Wing Loading N/A
  • Wing Area 0.0ft2 (0.0m2)
  • Drag Points 4173


  • Number of Parts 121
  • Control Surfaces 0
  • Performance Cost 618
  • Log in to leave a comment
  • Profile image

    @Juanfly154 Ooh LFA! Cool!

    2.3 years ago
  • Profile image
    63.9k Juanfly154

    @jamesPLANESii here

    2.3 years ago
  • Profile image
    63.9k Juanfly154

    @jamesPLANESii oh hell yeah man. this is so cool. imma show u what i am working on.

    2.3 years ago
  • Profile image

    I wrote half of the description and I basically died so I'll tag you on it early :)

    This has the engine code. The big engine makes the power, the little engine makes the noise

    2.3 years ago

This airplane is unlisted and upvoting is disabled.