* IDs der Druckluftflasche (und Splinter) geändert
[Luftherrschaft.git] / Luftherrschaft.c4d / Items.c4d / Craft.c4d / CompressedAirBottle.c4d / Script.c
blob15b60ded347d6f073493bee55971b54ee32b7614
1 /*-- Druckluftbehälter --*/
3 #strict 2
5 #include LHSS
7 //static const LCAB_MaxFill = 400;
8 private func MaxFill() { return 400; }
10 protected func Initialize() {
11 DoFill(200);
12 return _inherited();
15 /* Callbacks */
17 public func IsCompressedAirBottle() { return 1; }
19 public func FillPicture() { return 0; }
20 private func FillSound() { return Sound("pfft"); }
22 /* Einen harten Aufschlag überlebt die Flasche nicht! So; Be careful! */
23 protected func Hit3() {
24 var ExplodeSize;
25 if (!GetAmount())
26 return;
27 else {
28 CastObjects(LOSP, 4, 20);
29 if (GetAmount() >= 40) {
30 ExplodeSize = GetAmount() * GetAmount() / (40 - GetAmount()) + 15;
31 Schedule(Format("Explode(%d)", ExplodeSize), 108, 1, 0);
33 if (GetAmount() <= 40) {
34 ExplodeSize = GetAmount() / 40 + 20;
35 Schedule(Format("Explode(%d)", ExplodeSize), 108, 1, 0);