How do I extract all this bsp data ingame?

Hi all,

I’ve been working on a small side project of mine and I’ve run into a problem - I need to grab the outputs of a func_button in order to activate their targets at a time that lies inbetween the defined time and when the player has pressed the button (reducing/removing built-in delays essentially). I can’t seem to find anything on the wiki that will list me the outputs of a func_button, although I am able to extract this data in plaintext from a .bsp using VIDE:

"model" "*41"
"wait" "20"
"unlocked_sound" "0"
"unlocked_sentence" "0"
"speed" "5"
"spawnflags" "1024"
"sounds" "9"
"rendermode" "0"
"renderfx" "0"
"rendercolor" "255 255 255"
"renderamt" "255"
"origin" "1112.01 -395.98 104.94"
"movedir" "90 0 0"
"locked_sound" "0"
"locked_sentence" "0"
"lip" "0"
"health" "0"
"disablereceiveshadows" "0"
"classname" "func_button"
"hammerid" "996"
"OnPressed" "trap_01,Break,,0.4,-1"
"OnPressed" "template_01,ForceSpawn,,4,-1"

To me it kinda looks like keyvalues, but GetKeyValues won’t get me the “OnPressed” keys. Is there a way to grab this data ingame, on the fly? I would rather not extract these entity lumps manually and load them from txt.

You should be able to catch them with this gamemode hook:

works great, thanks!