Raised This Month: $44 Target: $400
 11% 

[L4D2] Better AI against spitter


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
JLmelenchon
Senior Member
Join Date: Mar 2019
Old 09-24-2022 , 09:11   [L4D2] Better AI against spitter
Reply With Quote #1

Bots will just pick up down teammates by staying in the spitter goo, always...

Could we command them to stay away from it even when a survivor is incapacited?
JLmelenchon is offline
oqyh
Senior Member
Join Date: May 2019
Location: United Arab Emirates
Old 09-24-2022 , 20:33   Re: [L4D2] Better AI against spitter
Reply With Quote #2

Quote:
Originally Posted by JLmelenchon View Post
Bots will just pick up down teammates by staying in the spitter goo, always...

Could we command them to stay away from it even when a survivor is incapacited?
https://forums.alliedmods.net/showthread.php?p=2754814

PHP Code:

// Which type of client (human/bot) should the plugin affect.
// 0 = NONE, 1 = HUMAN, 2 = BOT, 3 = BOTH.
// Add numbers greater than 0 for multiple options.
// Example: "3", enables for Humans and Bots.

l4d_prevent_action_damage_client_type "2" 


Or Survivor Bot Fix
https://forums.alliedmods.net/showthread.php?p=2757330
__________________
.:[ >> My Plugins << ]:.

My discord : Gold KingZ#1337

Last edited by oqyh; 09-24-2022 at 20:36.
oqyh is offline
Marttt
Veteran Member
Join Date: Jan 2019
Location: Brazil
Old 09-25-2022 , 21:14   Re: [L4D2] Better AI against spitter
Reply With Quote #3

my plugin has some bugs I plan rewriting it someday
__________________
Marttt is offline
JLmelenchon
Senior Member
Join Date: Mar 2019
Old 09-26-2022 , 09:10   Re: [L4D2] Better AI against spitter
Reply With Quote #4

Well the cvar is broken it does not differenciate bots from real players. Anyway i don't see how it will make bots more useful, it just prevent them from being able to pick up teammate but they will still stay in the spit. I am looking more for something like flyyoufools plugin that will force them to move away when acid is detected.

Last edited by JLmelenchon; 09-26-2022 at 09:11.
JLmelenchon is offline
Marttt
Veteran Member
Join Date: Jan 2019
Location: Brazil
Old 09-26-2022 , 11:04   Re: [L4D2] Better AI against spitter
Reply With Quote #5

You could try using L4D2 Actions extension, is what controls the bots behaviour, there is also a command callled CommandABot that allows you to send commands to bots, but nothing I'm really experienced with
__________________
Marttt is offline
JLmelenchon
Senior Member
Join Date: Mar 2019
Old 09-27-2022 , 21:59   Re: [L4D2] Better AI against spitter
Reply With Quote #6

while ((entity = FindEntityByClassname(entity, "insect_swarm")) != -1)

Does this code detect when there is acid ?
JLmelenchon is offline
BHaType
Great Tester of Whatever
Join Date: Jun 2018
Old 09-28-2022 , 21:25   Re: [L4D2] Better AI against spitter
Reply With Quote #7

Actually game does checks for damage while reviving and forces SurvivorReviveFriend action to end but bot will still continue to revive because valve forgot(?) to add StopRevive call.

PHP Code:
#pragma semicolon 1

#include <sourcemod>
#include <sdktools>
#include <actions>
#include <left4dhooks>

public void OnActionCreated(BehaviorAction actionint actor, const char[] name)
{
    if (
strcmp(name"SurvivorReviveFriend") == 0)
    {
        
action.OnInjuredPost SRFOnInjuredPost;
    } 
}

public 
Action SRFOnInjuredPost(BehaviorAction actionint actorAddress takaedamageinfoActionDesiredResult result)
{
    if (
result.type == DONE)
    {
        
L4D_StopReviveAction(actor);
    }

    return 
Plugin_Continue;

__________________
cry
BHaType is offline
Send a message via AIM to BHaType
Reply


Thread Tools
Display Modes

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 02:50.


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