summaryrefslogtreecommitdiffstats
path: root/TemplePushing.c4s/Locals.c4d/Extinguisher.c4d/Script.c
blob: 87dbd75ef1dca97e78b6b7cce1411e4e3d46a18b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
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);
}