Hi all. It seemed to me that this event was too boring and I modified it a bit. But there is one problem that I can't solve. If this event is loaded along with the map, then it breaks the spawn of the infected, there are practically none on the whole level. If someone can fix this I would appreciate it.
Anyway, I made a new version of it, it should work fine. and I also added a func_nav_blocker in this cfg to prevent the infected from trying to get past the barricade that you added until the pipebomb event is finished.
Anyway, I made a new version of it, it should work fine. and I also added a func_nav_blocker in this cfg to prevent the infected from trying to get past the barricade that you added until the pipebomb event is finished.
It seems everything worked out. Replaced "class name" "prop_physics" with "class name" "prop_physics_override" and spawning stopped breaking. For this model "model" "models/props_downtown/metal_door_112.mdl"
Out of curiosity, I checked the invisible walls of c5m4 and c5m1 with /ent, not realizing that the invisible walls that were not removed by the .lmp were added by TLS update. There are ways to remove these annoying entities added by TLS update, but it's a little too late for me XD.
In addition to these invisible walls added by TLS update, I also found some invisible walls in c5m1 and c5m3 that came from commentary.txt and not from TLS updates. Unfortunately, these invisible walls from commentary.txt do not have a hammerid or a targetname, and also Stripper's filter does not work with them.
I spent about a couple of hours yesterday looking up information and found two ways to remove such entities:
The first method is to use EntFire (via VScript) to remove the entity. Since EntFire can specify the classname as the receptor, you can simply use EntFire("classname", "kill"); to remove the entities. For example:
* Save them as .nut file and move the file to left4dead2\scripts\vscripts\
* You also need to add the following code to run the script in the cfg file (you need to make a "trigger" input for the logic_relay by yourself):
However, doing so will also remove unrelated entities with the same classname. If the entity type in the way is prop_dynamic, func_button or whatever, you're in trouble.
So what should you do? I tried it and found that I can change the classname of an entity without affecting its properties.
* Apparently, modifying the classname with AddOutput does not break the entity's properties.
* I have not tested pre-modifying the classname in the cfg file, as I think there is a good chance that it will make the entity not work properly. It's also best not to use logic_auto.
First you have to assign a targetname to the entities you want to keep, then use Addoutput to change the classname of the entities you don't want to delete to something else, then use EntFire to delete the entities you don't want to keep, and finally change the classname of the entities that are kept back. For example:
Code:
Msg("Whitelisting entities by targetname... \n");
EntFire("Egalitarians_targetname","AddOutput","classname \"Authoritarians\"");
Msg("Killing Egalitarians... \n");
EntFire("Egalitarians","kill");
Msg("Reclassing the entities in the whitelist... \n");
EntFire("Egalitarians_targetname","AddOutput","classname \"Egalitarians\"");
* I haven't tested whether the escapes within this code work properly, because I don't need to use them.
* If you want to delete one of the hundreds of entities with the same classname, it can be quite torturous to add targetnames to the objects that need to be excluded. I prefer to use another method to remove entities.
The second method is to remove entities via trigger_remove.
trigger_remove removes all entities it touches, regardless of whether they have hammerid or targetname, but if the entity to be removed does not have origin, then you still have to use EntFire.
First, you have to get the origin of the entity you want to remove, and then set the origin of the trigger_remove entity to the origin of the entity that you want to remove;
Then, set the range of the bounding box of the trigger_remove entity.
Also, you have to disable trigger_remove at the start, otherwise it will not find the entity you want to delete when it is triggered because of loading order issues
* Entities added by TLS and other things tend to be loaded after Stripper, which is probably why filter and OnMapSpawn don't work, because the time to find the entities or handle the entities is before the entities are generated.
* Use input "Enable" to trigger trigger_remove and make it remove the entities in its bounding box.
You also need to make a filter_activator_class for trigger_remove so that it only removes entities with a specific classname, otherwise it will remove all entities in the bounding box. This can have unintended consequences in some cases, such as game crashes caused by removing player entities.
* With filter_activator_class, unrelated entities are not removed even if they are within the bounding box of trigger_remove (provided that the unrelated entities do not have the same classname as the entity to be removed).
* It is best to disable trigger_remove (via input "Disable") as soon as the entities are removed, to avoid it creating unintended problems.
This method allows you to remove entities without hammerid and targetname without hurting innocent entities —— but they must have a origin.
VScript version:
PHP Code:
// remove an entity that can't be removed by CBaseEntity.Kill(), you have to replace/provide the value of origin in under code.
I also made another cfg file with a tank, but it is very hard for the expert difficulty (non-realism, just coop), I don't recommend anyone to use the one cfg file that has the tank, usually 4 player survivors will not pass it the first time and the second or third time.
* I haven't tested the cfg file without the tank yet xd.
To review the modification, join this steam group and join the server via the in-game steam group server list.
* Note: Public test servers are located in the US West.
* Servers are available until 2023-07-17(yyyy/mm/dd)
Requirements:
1) Sourcemod, Metamod and Stripper:Source
2) No scripts or plugins have removed or replaced the saferoom door in c1m3.
Installation:
1) Choose one of the .cfg files you want to use, rename it to "c1m3_mall.cfg" and put it in the /Left 4 Dead 2/left4dead2/addons/stripper/maps/ folder;
2) Put the .vpk file in the /Left 4 Dead 2/left4dead2/addons/ folder to remove the invisible walls of c1m3;
3) Put the .nav file in the /Left 4 Dead 2/update/maps folder to adjust the nav mesh for the entities that the cfg has added. you should make a backup of the original file before you replace it.