Profile image

Ammo counter & Autoloader

10.4k ThomasRoderick  1.7 years ago
Auto Credit Based on ThomasRoderick's Heat Gauge Prototype

Left row, top to bottom:

  1. in-game time when the last round is fired
  2. whether the gun is chambered or not, 1 = chambered, -1 = not chambered
  3. times the guns are cycled, which is equivalent of ammo fired by any one of the guns

Right row, top to bottom:

  1. time remaining for the autoloader to be fully loaded
  2. whether there's a shell in the breech ready to fire
  3. total number of shells fired
  4. number of shells in the autoloader

FireGuns: fire guns, the ammo-counting is automatic

FireWeapons: fire cannons, the cannons fire rapidly but if you fire all six shots at once, the cannon would now have a ROF of 1 shot/sec until the autoloader is allowed to replenish.


How to use them:

The Machine Guns:

  1. Install a placeholder gun, guide can be seen here. TL;DR: install another gun with activationGroup, damage, lifetime, spread, and impactForce set to "0", bulletScale to "0,0,0", burstCount to "1", roundsPerSecond and timeBetweenBursts to "1e+10", and muzzleVelocity to the same as your gun with the highest muzzle velocity.
  2. Create three new variables (or four if you want tracer spacing effects). Set their Expression to "1" as placeholder.
  3. Set the Expression of the first variable to
    " FireGuns & ((Time - [first variable name] ) > [actual time between rounds] ) ? Time : [first variable name] "
  4. Set the Expression of the second variable to
    " (Time - [first variable name] ) > [actual time between rounds minus at least 0.25] & [third variable name] <= [rounds per gun] "
  5. Set the expression of the third variable to
    " sum(max(rate( [second variable name] ), 0))/2 - 1 "
  6. (Only if you want tracer spacing effects, otherwise skip this step) Set the Expression of the fourth variable to
    " [second variable name] & (repeat( [third variable name], [tracer spacing]) = 0 | [third variable name] > [rounds per gun minus fifty or so]) "
  7. Install the actual guns. Set their burstCount to "1", roundPerSecond to something higher than their actual rate of fire, activationGroup to " [name of the second variable] ", and timeBetweenBursts to something like " [actual time between rounds minus at least 0.25] ". If tracer spacing effects are needed then set the timeBetweenBursts on the gun used to simulate tracers to something like " [actual time between rounds minus at least 0.15] " and the activationGroup to " [name of the fourth variable] ".

The Cannons:

  1. Create three new variables. Set their Expression to "1" as placeholder.
  2. Set the Expression of the first variable to " smooth(clamp01(rate( [second variable name] )) * [max rounds in the autoloader] , max(rate( [second variable name] ), 1/[time needed for replenish a round into the autoloader] )) "
  3. Set the Expression of the second variable to " ammo( "[name of the weapon]" ) > 0 ? [ammo of the weapon plus 0.1] - ammo( "[name of the weapon]" ) : [second variable name] "
  4. Set the Expression of the third variable to " floor( [max rounds in the autoloader] - [first variable name] ) "
  5. Install the cannon. Set the activationGroup to " [third variable name] > 0 ", ammoCount to " [maximum number of rounds per gun] ", and firingDelay to " [time needed for the autoloader to reload the gun] ".

Spotlights

General Characteristics

  • Predecessor Heat Gauge Prototype
  • Created On Android
  • Wingspan 8.2ft (2.5m)
  • Length 21.0ft (6.4m)
  • Height 4.1ft (1.2m)
  • Empty Weight 1,596lbs (724kg)
  • Loaded Weight 1,596lbs (724kg)

Performance

  • Wing Loading 296.7lbs/ft2 (1,448.7kg/m2)
  • Wing Area 5.4ft2 (0.5m2)
  • Drag Points 1090

Parts

  • Number of Parts 23
  • Control Surfaces 0
  • Performance Cost 98
  • Log in to leave a comment
  • Profile image
    270 Deltack

    This is really good!, but I don't know about variabel so I can't learn it, can you teach me? :D

    +1 2 months ago
  • Profile image

    @ThomasRoderick np

    +1 5 months ago
  • Profile image

    @ChaseplaneKLWith1MG Thanks!

    +1 5 months ago
  • Profile image
    319k WinsWings

    @ThomasRoderick THANK YOU so much. I will try it and I will give credit to you if I use it

    +1 one year ago
  • Profile image

    @WinsWings Well, feel free to use this and its companion piece in your upcoming builds!

    +1 one year ago
  • Profile image
    33.4k XiShi

    @ThomasRoderick very nice & easy to use (⁠◔⁠‿⁠◔⁠)

    +1 1.4 years ago
  • Profile image

    @GlassyBiomNewSPUser Thanks! How's the system?

    +1 1.4 years ago
  • Profile image
    9,624 FX6Aviaton

    @ThomasRoderick You are welcome!

    +1 1.5 years ago
  • Profile image

    @PlaneFX6 Thanks!

    1.5 years ago
  • Profile image

    @ThomasRoderick thats cool bro , i very like this concept , nice work 😁

    +1 1.6 years ago
  • Profile image

    @UseGooglePlay Thanks! How's the system?

    1.6 years ago
  • Profile image
    26.7k Bryan5

    @ThomasRoderick tested it, i kinda like it 👍

    +1 1.7 years ago
  • Profile image
    26.7k Bryan5

    @ThomasRoderick didn't tested it yet

    1.7 years ago
  • Profile image

    @Bryan5 Thanks! How's the system?

    1.7 years ago