View Single Post
HarryPotter
Veteran Member
Join Date: Sep 2017
Location: Taiwan, Asia
Old 10-04-2022 , 04:49   Re: [L4D/L4D2] Infected Bots Control (1.0.0)
Reply With Quote #1651

Quote:
Originally Posted by LinLinLin View Post
1.by setting all "z_xxxx_limit" to 0 can prevent director to spawn all types of SI ? i would like to use plugin to control SI and director to control the tank and witch spawn.
Yes,
PHP Code:
z_smoker_limit 0
z_boomer_limit 0
z_hunter_limit 0
z_spitter_limit 0
z_jockey_limit 0
z_charger_limit 0 
Actually, just use "director_allow_infected_bots 0", it is much simpler then above.
PHP Code:
director_allow_infected_bots             1        : , "sv""launcher" Allow bots to fill empty slots on the infected team 
Quote:
2.what the different between "z_spawn" and "z_spawn_old" ?
In l4d1, use z_spawn
In l4d2, use z_spawn_old

Quote:
3.why we need kick fakeclient of infected after using CreateFakeClient ? I think maybe fakeclient is an entity with 1< ent <31 index and another real client create after changing it's team , so we need to kick the fake client to reduce the slot use. Is that right ? But how can i get the real client id about this bot , use some event like player_spawn or player_team to get it ?
Using CreateFakeClient is not enough, the infected won't move and won't attack.
Need to kick fakeclient and let infected bot take over.
Also, You can not get the real infected bot client id after kicking fakeclient.
And CreateFakeClient() is pretty expensive function, it causes server laggy.
Details here

Quote:
4.In the original of this plugin , Spawn_Infectedbot_Director and Spawn_Infectedbot are similar ,
Spawn_Infectedbot has the extend part

PHP Code:
if (b_IsL4D2 && GameMode != 2)
    {
        new 
bot CreateFakeClient("Infected Bot");
        if (
bot != 0)
        {
            
ChangeClientTeam(bot,TEAM_INFECTED);
            
CreateTimer(0.1,kickbot,bot);
        }
    } 
i don't know why we need this in l4d2 , anyclient is to use cheatcommand "z_spawn_old" , but what about this bot ? z_spawn_old shold create a new client , i think maybe there are some bot in infected team and have no infected to play, z_spawn_old will use them first ?
The original of this plugin has too many bad codes and bad functions, that's why I rewrite the whole project.

Quote:
5.Do i need to consider about ghost state of SI in coop/realism mode (no real player in infected team).
No.
__________________

Last edited by HarryPotter; 10-04-2022 at 04:52.
HarryPotter is offline