Profile image

Burst cannon

1,348 uselessuser151  3.2 years ago
168 downloads

A simple cannon which is capable of firing in burst using FT

A Cannon (red one) firing in burst using a simple FT for activationGroup based on @SnoWFLakE0s' reloading code :

(smooth(clamp01(rate((clamp01((ceil(((ammo("[Name of cannon]"))/[Number of rounds in one burst])-(floor(((ammo("[Name of cannon]"))/[Number of rounds in one burst])))))=0)))), clamp01(rate((clamp01((ceil(((ammo("[Name of cannon]"))/[Number of rounds in one burst])-(floor(((ammo("[Name of cannon]"))/[Number of rounds in one burst])))))=0))))*pow(10, 4) + 1/([Time between bursts in seconds])) = 0)

Example:

(smooth(clamp01(rate((clamp01((ceil(((ammo("Cannon"))/50)-(floor(((ammo("Cannon"))/50)))))=0)))), clamp01(rate((clamp01((ceil(((ammo("Cannon"))/50)-(floor(((ammo("Cannon"))/50)))))=0))))*pow(10, 4) + 1/4) = 0)

This works by activate for x seconds each time the cannon's remain ammo become divisible to [Number of rounds in one burst]
If you want AG1 for instance just add [Activate1 & ] to the start of the code

Known issue(s):

Cannon's ammo have to be divisible to [Number of rounds in one burst]
This hasn't been tested much so there are likely more undiscovered bugs. If you find any, it will be very appreciated that you report them in the comments. I doubt I will be able to fix them but at least i know.

Feel free to use. Credit is optional.

HELP

This will be a part of my future post. I am quite okay with it. However it would be better if the cannon also has the ability to be manually reloaded. I have tried (remaining ammo + rounds fired since last reload) divide with round in one burst but it proves unsuccessful as the cannon stucks in a reload loop after reloaded (as shown in Cannon-1 (the yellow one)). And until now I still haven't figured out a way to either fix this or create something else.
So it would mean a lot to me if you spare some of your time and attempt to find a solution to patch my broken code. Or even better that you come up with a brand new one since I'm pretty sure using the whole ammo divisible stuff isn't the best way to make a burst cannon

Spotlights

General Characteristics

  • Created On Windows
  • Wingspan 1.6ft (0.5m)
  • Length 4.7ft (1.4m)
  • Height 2.6ft (0.8m)
  • Empty Weight 607lbs (275kg)
  • Loaded Weight 607lbs (275kg)

Performance

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

Parts

  • Number of Parts 4
  • Control Surfaces 0
  • Performance Cost 32
  • Log in to leave a comment
  • Profile image
    14.2k R4FABR

    Really cool man!

    +1 2.9 years ago
  • Profile image

    LeopArd go brrr

    +1 3.2 years ago
  • Profile image

    I'm building a vk 16.o2

    +1 3.2 years ago
  • Profile image

    @uselessuser151 thx

    3.2 years ago
  • Profile image

    @BoganBoganTheKid You change [Time between bursts in seconds] into a big number

    3.2 years ago
  • Profile image

    How do I increase reload time

    3.2 years ago
  • Profile image

    @uselessuser151 ;)

    3.2 years ago
  • Profile image

    @BoganBoganTheKid Well there was an attempt, I appreciate that ^^

    3.2 years ago
  • Profile image

    But I cant make mu own formula:(

    3.2 years ago
  • Profile image

    @uselessuser151 I know that

    3.2 years ago
  • Profile image

    @BoganBoganTheKid If you mean you don't know how to add the FT code then you may copy the code in the description to Microsoft Word or something, replace those red words in the description with what you want, then paste it to the activationGroup of your cannon part using Overload. You can also edit the plane file using NotePad or something.

    +1 3.2 years ago
  • Profile image

    i like it but idk what to do

    3.2 years ago