I did a lot of scanning through the Valve Dev docs and have done experiment after experiment trying to get a proper result.
I have a map with a trigger_remove entity built into it. It creates an issue when ragdoll entities are spawned in it, causing the server to crash. What I’ve been trying to is create a filter_activator_class to direct it to, obviously with prop_ragdoll filterclass.
I start out by creating the filter using the following code
trigFilterActivator = ents.Create("filter_activator_class") trigFilterActivator:SetKeyValue("filterclass", "prop_ragdoll") trigFilterActivator:SetKeyValue("targetname", "trig_filter") trigFilterActivator:SetKeyValue("negated", 1) trigFilterActivator:Spawn()
First off, I’m worried that I’m not even using the correct keys. I’ve mixed what I see on Valve Dev along with what little actually gets returned with GetKeyValues and usage I might have seen on other entities.
I’ve tried many more variations of keynames without much luck.
Following this, I run SetKeyValue(“filtername”, “trig_filter”) on the trigger_remove. Again, I’m not comfortable with the keyname, and have tried different variations. I’ve also tried doing SetEntity(“filtername”, trigFilterActivator).
The most I’ve been able to accomplish is changing “spawnflags” of the trigger_remove. The behaviour changes appropriately, but that’s not exactly what I need.
Am I doing things incorrectly, or is this just not possible and I’m trying to turn lead into gold? I can do other methods, but I’d like to use this one if I can. Thanks in advance for any input!