summaryrefslogtreecommitdiffstats
path: root/Items.c4d/Sensors.c4d/Sensor.c4d/SensorEntrance.c4d/Script.c
blob: 0aa77fb25f7a1b4c35f68528912ee3a24cc0294c (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
29
30
31
32
33
#strict 2

local target;

func Initialize()
{
	SetVisibility(VIS_None);
}

func Attach(object obj)
{
	target = obj;
	SetAction("Attach", target);
	AddEffect("AttachCheck", target, 1, 0, this);
	SetName(GetName(obj));
	SetGraphics(0, this, GetID(target), GFX_Overlay, GFXOV_MODE_Picture);
	return this;
}

func FxAttachCheckStop()
{
	return RemoveObject();
}

func ActivateEntrance(object caller)
{
	FinishCommand(caller, true);
	target->Call(target->EntranceCallback(), caller, ...);
	return 1;
}

func HiddenEntrance() { return true; }
func SensorIgnored() { return true; }