diff options
| author | Jan <> | 2015-02-02 17:55:29 +0100 |
|---|---|---|
| committer | Jan <_> | 2015-07-10 17:49:45 +0200 |
| commit | 32a9632fbca3dd7a88bd3154b84a3773af39c276 (patch) | |
| tree | a226b9404844a73c7229e9d13db993c86b5be2c1 /TemplePushing.c4s/Rules.c4d/Extinguisher.c4d/Script.c | |
| parent | 40fb3e5d61c44886b06d839a35adb0c11a5f918f (diff) | |
| download | tempelschubsen-32a9632fbca3dd7a88bd3154b84a3773af39c276.tar.gz tempelschubsen-32a9632fbca3dd7a88bd3154b84a3773af39c276.zip | |
TemplePush v6.1.7601.18409.c4s
Diffstat (limited to 'TemplePushing.c4s/Rules.c4d/Extinguisher.c4d/Script.c')
| -rw-r--r-- | TemplePushing.c4s/Rules.c4d/Extinguisher.c4d/Script.c | 35 |
1 files changed, 35 insertions, 0 deletions
diff --git a/TemplePushing.c4s/Rules.c4d/Extinguisher.c4d/Script.c b/TemplePushing.c4s/Rules.c4d/Extinguisher.c4d/Script.c new file mode 100644 index 0000000..b776159 --- /dev/null +++ b/TemplePushing.c4s/Rules.c4d/Extinguisher.c4d/Script.c @@ -0,0 +1,35 @@ +/*-- Extinguisher --*/ + +#strict 2 + +private func Check() +{ + if (!ActIdle()) return; + for (var obj in FindObjects(Find_OCF(OCF_OnFire))) + { + if (!FindObject2(Find_ID(GetID()), Find_Action("IsOnFire"), Find_ActionTarget(obj), Find_OCF(OCF_Alive))) + { + var extinguisher = CreateObject(GetID(), 0, 0, NO_OWNER); + extinguisher->SetAction("IsOnFire", obj); + } + } +} + +private func DoExtinguish() +{ + var target = GetActionTarget(); + if (!target || !target->GetAlive()) + { + RemoveObject(); + return; + } + + if (GetActTime() > 200) + { + target->Extinguish(); + RemoveObject(); + return; + } +} + +protected func Activate(int player) { MessageWindow(GetDesc(), player); } |
