2 void relay_activators_use(entity this, entity actor, entity trigger)
4 for(entity trg = NULL; (trg = find(trg, targetname, this.target)); )
7 trg.setactive(trg, this.cnt);
10 //bprint("Not using setactive\n");
11 if(this.cnt == ACTIVE_TOGGLE)
12 if(trg.active == ACTIVE_ACTIVE)
13 trg.active = ACTIVE_NOT;
15 trg.active = ACTIVE_ACTIVE;
17 trg.active = this.cnt;
22 spawnfunc(relay_activate)
24 this.cnt = ACTIVE_ACTIVE;
25 this.use = relay_activators_use;
28 spawnfunc(relay_deactivate)
30 this.cnt = ACTIVE_NOT;
31 this.use = relay_activators_use;
34 spawnfunc(relay_activatetoggle)
36 this.cnt = ACTIVE_TOGGLE;
37 this.use = relay_activators_use;