2 Questions AddOutput and func_regenerate

EmNudge

L4: Comfortable Member
Sep 23, 2015
184
60
Decided to put these into one thread instead of spamming the sub-forum with tons of smaller ones.

1. Can I use AddOuput to set a targetname to a player and from then make buttons that only that player could activate. This might be useful in a jump map, allowing players who have gotten past certain jumps to be able to choose a previous jump location. This could easily be done with sourcemod and a command, but I want it to be built in.

2. func_regenerate is good for jump maps, but it plays a resupply sound every second. Is there a way to disable it on a specific func_regenerate?
 

henke37

aa
Sep 23, 2011
2,075
515
You can filter on a lot of things. The targetname kv is one of them. And filters just so happen to work with button entities.
 

Egan

aa
Feb 14, 2010
1,375
1,721
1. Ya you can have the func_button target a filter entity itself with the input 'TestActivator'. The filter will then spit out OnPass or OnFail if the player matched the filter. You can use a quick output like:
' OnPass , !activator , AddOutput , origin -1623 -12805 1425 , after 0.1 '
to teleport the player somewhere without having to deal with toggling a filtered trigger_teleport. (bunnyhop maps do this a lot because they don't have the spare entities to use for teleports).

2. Ya http://tf2maps.net/posts/197548/ I think Freyja made a post about this also but google didn't find it.
 

EmNudge

L4: Comfortable Member
Sep 23, 2015
184
60
1. Ya you can have the func_button target a filter entity itself with the input 'TestActivator'. The filter will then spit out OnPass or OnFail if the player matched the filter. You can use a quick output like:
' OnPass , !activator , AddOutput , origin -1623 -12805 1425 , after 0.1 '
to teleport the player somewhere without having to deal with toggling a filtered trigger_teleport. (bunnyhop maps do this a lot because they don't have the spare entities to use for teleports).

2. Ya http://tf2maps.net/posts/197548/ I think Freyja made a post about this also but google didn't find it.
Thanks, but as for the second portion - is there a way to only stop the resupply sound for a specific trigger?
The map I have only has part of it an actual jump map. There are resupply lockers In spawn.
 

Egan

aa
Feb 14, 2010
1,375
1,721
Thanks, but as for the second portion - is there a way to only stop the resupply sound for a specific trigger?
The map I have only has part of it an actual jump map. There are resupply lockers In spawn.

Not as far as I know, you might just have to re-add the existing resupply sound but under a new name and play it from an ambient_generic in the map near the resupply cabinet. Here's the page on sound scripts by the way, maybe there's something in there for specific cases.