Raised This Month: $51 Target: $400
 12% 

[L4D & L4D2] Target Override (2.29) [25-Mar-2024]


Post New Thread Reply   
 
Thread Tools Display Modes
little_froy
Senior Member
Join Date: May 2021
Old 11-22-2022 , 14:37   [L4D2] How to let tank ignore incapacitated players?
Reply With Quote #121

i tried [L4D & L4D2] Target Override (2.23) [28-Oct-2022]
https://forums.alliedmods.net/showthread.php?t=322311

and set "incap" to 0 or 3, and add 3 in the last of "order" or remove it from order
however, they do not works.

Last edited by little_froy; 11-22-2022 at 14:39.
little_froy is offline
Silvers
SourceMod Plugin Approver
Join Date: Aug 2010
Location: SpaceX
Old 11-23-2022 , 05:33   Re: [L4D2] How to let tank ignore incapacitated players?
Reply With Quote #122

Quote:
Do not cross-post threads to multiple forums (or posts to multiple threads).
Please don't create extra threads, reply to the plugin topic itself.

Show the config you set for the Tank.
__________________
Silvers is offline
little_froy
Senior Member
Join Date: May 2021
Old 11-23-2022 , 05:46   Re: [L4D2] How to let tank ignore incapacitated players?
Reply With Quote #123

Quote:
Originally Posted by Silvers View Post
Please don't create extra threads, reply to the plugin topic itself.

Show the config you set for the Tank.
Code:
	"tank"
	{
		"order"		"1,2,4,5,6,7,3" // Preference: Last attacker, then Vomited Survivors, then Incapped, then normal Survivors.
		"pinned"	"15"
		"incap"		"0"
		"voms"		"1"
		"voms2"		"1"
		"range"		"0.0"
		"dist"		"250.0"
		"wait"		"2.0"
		"last"		"1"
		"time"		"2.0"
		"safe"		"1"
		"targeted"	"0"
	}
little_froy is offline
Silvers
SourceMod Plugin Approver
Join Date: Aug 2010
Location: SpaceX
Old 11-23-2022 , 07:37   Re: [L4D2] How to let tank ignore incapacitated players?
Reply With Quote #124

Quote:
Originally Posted by little_froy View Post
Code:
	"tank"
Works fine for me, tank avoids incapped. If the tank walks very close or over an incapped player it will attack them, that's how the game works, but it can also move on to someone else instead of continuing to attack the incapped player.
__________________
Silvers is offline
HarryPotter
Veteran Member
Join Date: Sep 2017
Location: Taiwan, Asia
Old 11-23-2022 , 10:58   Re: [L4D2] How to let tank ignore incapacitated players?
Reply With Quote #125

Quote:
Originally Posted by Silvers View Post
Works fine for me, tank avoids incapped. If the tank walks very close or over an incapped player it will attack them, that's how the game works, but it can also move on to someone else instead of continuing to attack the incapped player.
I can confirm what little_froy said is true.
The bug happens when incapacitated player leaves the server or when bot takes over the incapacitated player.

I think we can add more events to fix,

PHP Code:
    HookEvent("player_bot_replace"OnBotSwap);
    
HookEvent("bot_player_replace"OnBotSwap);

public 
void OnBotSwap(Event event, const char[] namebool dontBroadcast)
{
    
int bot GetClientOfUserId(GetEventInt(event"bot"));
    
int player GetClientOfUserId(GetEventInt(event"player"));
    if (
bot && bot <= MaxClients && player && player <= MaxClients
    {
        if (
strcmp(name"player_bot_replace") == 0//bot replaces player
        
{
            
g_bCheckpoint[bot]            = g_bCheckpoint[player];
            
g_bIncapped[bot]            = g_bIncapped[player];
            
g_bLedgeGrab[bot]            = g_bLedgeGrab[player];
            
g_bPinSmoker[bot]            = g_bPinSmoker[player];
            
g_bPinHunter[bot]            = g_bPinHunter[player];
            if( 
g_bLeft4Dead2 )
            {
                
g_bPinJockey[bot]  = g_bPinJockey[player];
                
g_bPinCharger[bot] = g_bPinCharger[player];
                
g_bPumCharger[bot] = g_bPumCharger[player];
            }
        }
        else 
// player replaces bot
        
{
            
g_bCheckpoint[player]            = g_bCheckpoint[bot];
            
g_bIncapped[player]            = g_bIncapped[bot];
            
g_bLedgeGrab[player]            = g_bLedgeGrab[bot];
            
g_bPinSmoker[player]            = g_bPinSmoker[bot];
            
g_bPinHunter[player]            = g_bPinHunter[bot];
            if( 
g_bLeft4Dead2 )
            {
                
g_bPinJockey[player]  = g_bPinJockey[bot];
                
g_bPinCharger[player] = g_bPinCharger[bot];
                
g_bPumCharger[player] = g_bPumCharger[bot];
            }
        }
    }

__________________

Last edited by HarryPotter; 11-23-2022 at 11:05.
HarryPotter is offline
Silvers
SourceMod Plugin Approver
Join Date: Aug 2010
Location: SpaceX
Old 11-23-2022 , 17:04   Re: [L4D & L4D2] Target Override (2.24) [24-Nov-2022]
Reply With Quote #126

Code:
2.24 (24-Nov-2022)
    - Fixed plugin not accounting for idle or disconnected players being replaced by bots. Thanks to "HarryPotter" for help.
__________________
Silvers is offline
kooper990
Member
Join Date: Jan 2021
Old 06-08-2023 , 14:06   Re: [L4D & L4D2] Target Override (2.24) [24-Nov-2022]
Reply With Quote #127

anyone got a suggested setup to prevent my Tank from switching between downed and last attacking survivor in rapid succession? It is inconsistent
kooper990 is offline
Kanashimi
Junior Member
Join Date: Jan 2023
Old 06-08-2023 , 16:21   Re: [L4D & L4D2] Target Override (2.24) [24-Nov-2022]
Reply With Quote #128

Quote:
Originally Posted by kooper990 View Post
anyone got a suggested setup to prevent my Tank from switching between downed and last attacking survivor in rapid succession? It is inconsistent
I'm having the same problem. This mod makes the Tank fights way too easy cause the Tank switches targets too fast.
Kanashimi is offline
Silvers
SourceMod Plugin Approver
Join Date: Aug 2010
Location: SpaceX
Old 06-08-2023 , 17:38   Re: [L4D & L4D2] Target Override (2.24) [24-Nov-2022]
Reply With Quote #129

Change the "time" param for the tank:
PHP Code:
// time:        When using the "last" order "7", how many seconds since the last attacker hurt the Special Infected before being able to change target. 
If the target is invalid it'll switch anyway, but this allows it to continue attacking the last attacker for a specified amount of time.

You could also change the "wait" time:
PHP Code:
// wait:        How many seconds to target someone before being allowed to switch to another target. They will switch before if the player is no longer valid or allowed to be targeted. 
I suppose at some point when I find a few mins I could add a "damage" option to target the person who has caused the highest damage, instead of last attacker. Unless you set the "time" value high enough that it doesn't constantly change target.
__________________

Last edited by Silvers; 06-08-2023 at 17:49.
Silvers is offline
Kanashimi
Junior Member
Join Date: Jan 2023
Old 06-08-2023 , 18:21   Re: [L4D & L4D2] Target Override (2.24) [24-Nov-2022]
Reply With Quote #130

Quote:
Originally Posted by Silvers View Post
Change the "time" param for the tank:
PHP Code:
// time:        When using the "last" order "7", how many seconds since the last attacker hurt the Special Infected before being able to change target. 
If the target is invalid it'll switch anyway, but this allows it to continue attacking the last attacker for a specified amount of time.

You could also change the "wait" time:
PHP Code:
// wait:        How many seconds to target someone before being allowed to switch to another target. They will switch before if the player is no longer valid or allowed to be targeted. 
I suppose at some point when I find a few mins I could add a "damage" option to target the person who has caused the highest damage, instead of last attacker. Unless you set the "time" value high enough that it doesn't constantly change target.
I think the damage parameter would be good because in case someone starts meleeing the tank, the tank can punch them. Even with the timer set high, the tank is able to get meleed on cause it's focusing whos shooting it.
Kanashimi is offline
Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 07:40.


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