Logic_script - Expand groups past 15?


I was updating a map of mine in which i basically have 36 buttons (more coming) that basically should play and stop audiofiles in L4D2.
But i stumbled upon some trouble.

Here’s how the whole thing is set up.
it works with a button, a logic_script, the sound entities and of course the vscript.
The button tells the logic_script to run the function “PlayL4D1Win()” from my script, that function then tells the logic_script to stop all playing sounds and play the song listed in EntityGroup[12] (or whatever was specified in the script).

It works perfectly fine. without a single problem so far. But here’s where the trouble comes in: the logic_script only allows a maximum of 16 EntityGroups, 0 to 15. But i need more.
So i visited the developer wiki and read that appereantly you can just turn off “smart edit” and just add more lines. So i did that, but it didn’t work. So i thought i’d just modify the base.fgd and just expand the available slots from 15 to 100.
Expanding the list worked, but the game would still not accept anything beyond the default maximum.

The game would just give me the following error whenever i tried to use any of the buttons:

Looking at the callstack i can see that the game clearly knew that i pressed a button that should turn off all music and then play the soundfile, but it just wouldn’t do it because it doesn’t register the new lines.
I could revert to the default style which uses the standart limit of 16 and then just have multiple logic_script entities until i reached the required amount, but that’s a bit of a pain.
Does anyone know a proper way to do this, or is this impossible, in which case the wiki article blatantly lied?

Are vscript really needed for that ?
You could use a math_counter + some logic_case to play the sound depending of the counter value.

I have used some vscript in csgo, but I never really tried the EntityGroups.

You could have your logic_case (all with the same name) do RunScriptCode to execute the functions.

First logic case has:
Case01 1
Case02 2

Case16 16

Second logic case has:
Case01 17
Case02 18

Case16 32

By doing InValue with the counter, it will trigger the corresponding case.

OnGetValue > logic case name > InValue

If the counter value is 2, it will trigger OnCase02 of the logic_case.

You could also play and stop sounds on any entity with the EmitSoundOn() and StopSoundOn() functions, although you’d probably need to precache any sounds first if they don’t play naturally in the map.