Hello.
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?