I have an idea! Is it possible to give the !activator of the button a specific targetname and then enable a trigger_multiple that is filtered for that name via filter_activator_name? That way, the trigger_multiple could carry out the output of the button and nothing would happen if the traitor activated the button from outside the room.
I’ve had no luck over in the Lua section with this. They tell me it isn’t possible via Lua.
[editline]7th December 2013[/editline]
I have done the (seemingly) impossible!
I created a trigger_multiple filtered for the name traitor_1 via the filter_activator_name entity. I moved the ttt_traitor_button’s output over to the trigger_multiple instead.
I then set up the ttt_traitor_button’s output like so:
What’s happening here is that the trigger_multiple is constantly looking for anything named “traitor_1” within it’s volume. The ttt_traitor_button changes the name of the player who activated it to “traitor_1” for a split second, effectively activating the output ONLY when the traitor is in the room. Otherwise nothing will happen. I also was able to display a message to the player if he isn’t in the room and tries to use the button. Perfect.