AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   General (https://forums.alliedmods.net/forumdisplay.php?f=58)
-   -   [L4D2] Stripper help with deleting defibs (https://forums.alliedmods.net/showthread.php?t=338388)

Mr. Man 07-01-2022 19:00

[L4D2] Stripper help with deleting defibs
 
Hi, got this Stripper code to remove all defibs from all maps but they are still spawning. Appreciate all insights:

Code:

; --- Remove defibrillators
modify:
{
        match:
        {
                "classname" "weapon_item_spawn"
        }
        replace:
        {
                "item12" "0"
        }
}
filter:
{
        "classname" "weapon_defibrillator_spawn"
}
{
        "classname" "weapon_defibrillator"
}


Marttt 07-01-2022 19:12

Re: [L4D2] Stripper help with deleting defibs
 
Better give more info like which map etc
Also some stuff is converted during mid game.
Try changing some cvars like:

director_convert_pills_to_defib_health 0

Austin 07-02-2022 11:04

Re: [L4D2] Stripper help with deleting defibs
 
2 Attachment(s)
Your stripper filter rules look good and I tested they do work,
(not sure what you are doing with the replace rule)
but stripper only runs once at map start so it will only remove items at map start.
The director gets involved and spawns them during the map.

I had already written a plugin to remove all meele weapons so I just modified it to only remove defibs.
It removes all defibs at map start and then checks every 20 seconds and
if it finds more it removes them even the ones players are carrying.

This will get rid of all of them "for good"!

With this plugin you don't need thoses stripper rules either.

Enjoy.

Mr. Man 07-02-2022 11:20

Re: [L4D2] Stripper help with deleting defibs
 
Thanks all!

Austin 07-03-2022 14:47

Re: [L4D2] Stripper help with deleting defibs
 
Quote:

Originally Posted by Mr. Man (Post 2782903)
Thanks all!

Now could you do me a favor?

1) Click the edit button on your original post.
2) In the edit screen lower right click the Go Advanced button
3) Upper left under title select Solved!

Did you get it working as expected?

Mr. Man 07-05-2022 22:16

Re: [L4D2] Stripper help with deleting defibs
 
Quote:

Originally Posted by Austin (Post 2782999)
Now could you do me a favor?

1) Click the edit button on your original post.
2) In the edit screen lower right click the Go Advanced button
3) Upper left under title select Solved!

Did you get it working as expected?

Not yet, I am playing with some CVARs to avoid having to run a plugin to manage this but they seem to be spawning still.

Marttt 07-06-2022 09:21

Re: [L4D2] Stripper help with deleting defibs
 
Could you tell the map and the spot where it occurs?

moschinovac 07-07-2022 13:37

Re: [L4D2] Stripper help with deleting defibs
 
Faster way is use Vscript then the item will remove from map…

Austin 07-07-2022 19:54

Re: [L4D2] Stripper help with deleting defibs
 
1 Attachment(s)
Quote:

Originally Posted by Mr. Man (Post 2783145)
Not yet, I am playing with some CVARs to avoid having to run a plugin to manage this but they seem to be spawning still.

Quote:

Originally Posted by moschinovac (Post 2783256)
Faster way is use Vscript then the item will remove from map…

Thanks for pointing us in this direction....

I found this bit of interesting information on VScripts used to removed the auto spawned defibs.
https://forums.alliedmods.net/showthread.php?t=332508
Thanks go to GoGetSomeSleep.

I tested the attached VScript file and it does remove the auto spawned defibs.
I do not know if it will keep the ones the director spawns from appearing.
If it doesn't then this isn't any better then your stripper rules.

I am going to remain positive and say there is a 90% chance this will also keep the director from directly spawning defibs too and you will finally have what you are looking for.

Let us know if it works for you....

Put the attached file in this folder.
create the folder if it doesn't exists.
..\left4dead2\scripts\vscripts\coop.nut

If you also want this for versus then make a copy and name it.
..\left4dead2\scripts\vscripts\versus.nut

You will still need your stripper rules since this VScript doesn’t affect any defib entities that are placed in the map to start with.

Any reason why we can't upload .nut files?

moschinovac 07-07-2022 23:49

Re: [L4D2] Stripper help with deleting defibs
 
Code:

MutationOptions <-
{
        // remove defibs auto spawns
        weaponsToRemove =
        {
                weapon_defibrillator = 0
        }

        function AllowWeaponSpawn( classname )
        {
                if ( classname in weaponsToRemove )
                {
                        return false;
                }
                return true;
        }

        function ShouldAvoidItem( classname )
        {
                if ( classname in weaponsToRemove )
                {
                        return true;
                }
                return false;
        }
}

if u want convert defib to pills or something

Code:

MutationOptions <-
{
        weaponsToConvert =
        {
                weapon_defibrillator = "weapon_pain_pills_spawn"
        }

        function ConvertWeaponSpawn( classname )
        {
                if ( classname in weaponsToConvert )
                {
                        return weaponsToConvert[classname];
                }
                return 0;
        }
}



All times are GMT -4. The time now is 02:37.

Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.