24 bool key_used =
false;
25 bool started_delay =
false;
39 key_used = item_keys_usekey(
this, store);
49 play2(toucher, this.
noise1);
50 Send_Notification(NOTIF_ONE, toucher, MSG_CENTER, CENTER_DOOR_LOCKED_ALSONEED, item_keys_keylist(this.
itemkeys));
51 toucher.key_door_messagetime =
time + 2;
53 else if(toucher.key_door_messagetime <=
time)
56 play2(toucher, this.
noise2);
57 Send_Notification(NOTIF_ONE, toucher, MSG_CENTER, CENTER_DOOR_LOCKED_NEED, item_keys_keylist(this.
itemkeys));
58 toucher.key_door_messagetime =
time + 2;
63 if(this.
delay <=
time || started_delay ==
true)
75 play2(toucher, this.
noise);
95 WriteHeader(MSG_ENTITY, ENT_CLIENT_KEYLOCK);
97 WriteInt24_t(MSG_ENTITY, this.
itemkeys);
100 trigger_common_write(
this,
true);
105 void trigger_keylock_link(
entity this)
132 if(!this.
itemkeys) {
delete(
this);
return; }
142 this.
noise =
"misc/secret.wav";
146 this.
noise =
"misc/trigger1.wav";
151 this.
noise1 =
"misc/decreasevalue.wav";
169 trigger_keylock_link(
this);
177 trigger_common_read(
this,
true);
181 this.entremove = trigger_remove_generic;
void trigger_keylock_kill(string s)
kill killtarget of trigger keylock.
#define REGISTER_NET_LINKED(id)
#define EXACTTRIGGER_INIT
void trigger_keylock_trigger(entity this, entity actor, string s)
trigger given targets
#define NET_HANDLE(id, param)
spawnfunc(info_player_attacker)
void trigger_keylock_touch(entity this, entity toucher)