1 #include "relay_activators.qh"
4 void relay_activators_use(entity this, entity actor, entity trigger)
6 if(this.active != ACTIVE_ACTIVE)
9 for(entity trg = NULL; (trg = find(trg, targetname, this.target)); )
12 trg.setactive(trg, this.cnt);
15 //bprint("Not using setactive\n");
16 generic_setactive(trg, this.cnt);
21 void relay_activators_init(entity this)
23 this.reset = relay_activators_init; // doubles as a reset function
24 this.active = ACTIVE_ACTIVE;
25 this.use = relay_activators_use;
28 spawnfunc(relay_activate)
30 this.cnt = ACTIVE_ACTIVE;
31 relay_activators_init(this);
34 spawnfunc(relay_deactivate)
36 this.cnt = ACTIVE_NOT;
37 relay_activators_init(this);
40 spawnfunc(relay_activatetoggle)
42 this.cnt = ACTIVE_TOGGLE;
43 relay_activators_init(this);