Profile image

I can’t turn my bomb off…Help?

15.3k Reuben201103  3.8 years ago

Recently, one of my many side projects Has been making a bomb which detonates at a set altitude using funky trees, unfortunately I’ve run into a problem where the bomb goes off whenever the aircraft is below the burst altitude (100m) and can’t seem to be able to prevent this from happening.
The bomb uses a cannon as the ‘warhead’ and a cleaver and detacher as a fuze. It seems to work absolutely fine, as long as the aircraft is spawned in the air and stays there until the bomb has been dropped, so the problem is only being able to turn the bomb off.

The script for the air burst is :

clamp01(floor(smooth( clamp01(-ammo("Warhead")), (1.02 / ( sqrt(pow(rate(Altitude) - (sum(ammo("Warhead") = 0 ? rate( rate(Altitude)) : 0 )), 2) + 29.8(AltitudeAgl-100-sum(ammo("Warhead") = 0 ? rate(Altitude) : 0)))/9.8))))

If you can manage to fix it please let me know and if you know anyone who might help please tag them.

  • Log in to leave a comment
  • Profile image

    It does that because the altitude is calculated with the cockpit, so if the cockpit is below 100m, the bomb detonates. If the cockpit isn't below 100m, the bomb won't detonate until it hits the ground or the cockpit enters an altitude below 100m.

    3.8 years ago