diff options
| author | Jan <> | 2015-02-02 17:05:03 +0100 |
|---|---|---|
| committer | Jan <_> | 2015-07-10 17:44:33 +0200 |
| commit | f5a80c493dcefbc8f45987b8fd454d974f739cf7 (patch) | |
| tree | 724195326f990379940b35e0f5eaacb37e4860bc /TemplePushing.c4s/Locals.c4d/Extinguisher.c4d/Script.c | |
| download | tempelschubsen-f5a80c493dcefbc8f45987b8fd454d974f739cf7.tar.gz tempelschubsen-f5a80c493dcefbc8f45987b8fd454d974f739cf7.zip | |
TemplePushBeta.c4s
Diffstat (limited to 'TemplePushing.c4s/Locals.c4d/Extinguisher.c4d/Script.c')
| -rw-r--r-- | TemplePushing.c4s/Locals.c4d/Extinguisher.c4d/Script.c | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/TemplePushing.c4s/Locals.c4d/Extinguisher.c4d/Script.c b/TemplePushing.c4s/Locals.c4d/Extinguisher.c4d/Script.c new file mode 100644 index 0000000..87dbd75 --- /dev/null +++ b/TemplePushing.c4s/Locals.c4d/Extinguisher.c4d/Script.c @@ -0,0 +1,28 @@ +/*-- Löschobjekt --*/ + +#strict + +func Check() +{ + if(GetAction()ne"Idle") return(0); + while(Var()=FindObject(0,0,0,0,0,OCF_OnFire(),0,0,0,Var())) + if(!FindObject(GetID(),0,0,0,0,0,"IsOnFire",Var()) && GetAlive(Var(0))) + ObjectSetAction(CreateObject(GetID(),0,0,-1),"IsOnFire",Var()); + return(1); +} + +func DoExtinguish() +{ + if(!GetAlive(GetActionTarget())) return(RemoveObject()); + if(GetActTime()>200 && !Random(4)) { + Extinguish(GetActionTarget()); + return(RemoveObject()); + } + return(1); +} + +func Activate() +{ + MessageWindow(GetDesc(),Par()); + return(1); +} |
