574
edits
m (→Features so far: Small edit) |
(Updated to work with 3.5+ failure system, its quite stable, have used it in the JA37 for almost a year now.) |
||
Line 1: | Line 1: | ||
Inspired by the crash system in the [[Mikoyan-Gurevich_MiG-15|Mig-15]], this system is meant to become generic and usable for all aircraft by adding just a few lines. For now you have to add a file with code though. | Inspired by the crash system in the [[Mikoyan-Gurevich_MiG-15|Mig-15]] by Slavutinsky Victor, this system is meant to become generic and usable for all aircraft by adding just a few lines. For now you have to add a file with code though. | ||
== Features so far== | == Features so far== | ||
* Impact, crash and explosion detection. | * Impact, crash and explosion detection. | ||
* Tied into the new 3. | * Tied into the new 3.5+ failure manager. | ||
* Over-G detection for wing stress. | * Over-G detection for wing stress. | ||
* Sounds. | * Sounds. | ||
Line 21: | Line 21: | ||
# | # | ||
# | # | ||
# Version 0. | # Version 0.14 | ||
# | # | ||
# License: | # License: | ||
Line 559: | Line 559: | ||
# use: | # example use: | ||
var crashCode = CrashAndStress.new([0,1,2], {"weightLbs":30000, "maxG": 12}, ["controls/flight/aileron", "controls/flight/elevator"]); | var crashCode = nil; | ||
crashCode.start(); | var crash_start = func { | ||
removelistener(lsnr); | |||
crashCode = CrashAndStress.new([0,1,2], {"weightLbs":30000, "maxG": 12}, ["controls/flight/aileron", "controls/flight/elevator"]); | |||
crashCode.start(); | |||
} | |||
var lsnr = setlistener("sim/signals/fdm-initialized", crash_start); | |||
# test: | # test: | ||
Line 569: | Line 575: | ||
</syntaxhighlight> | </syntaxhighlight> | ||
Notice that you should edit the line underneath '''# use''' to fit your aircraft requirements. | Notice that you should edit the line underneath '''# example use''' to fit your aircraft requirements. | ||
In your -set.xml file under nasal tags add | In your -set.xml file under nasal tags add |
edits