PDA

View Full Version : [Solved] [L4D2] Super Infected Plugin Related


Maku
01-16-2021, 04:35
Here is the original plugin:
https://forums.alliedmods.net/showthread.php?t=129639

I posted there not too long ago but when I checked the creator of the plugin, he/she was last online on 2014...

I really like this plugin a lot but there are some issues I've had with it when I set the spawn chance probability to 100.


Here is the post that I made.
Does this plugin instantly spawns the Super Infected?

I've set the Super Infected to 100% chance of spawning but there is a delay for a few seconds.

It was noticeable because their skin colour wasn't changing before a certain amount of time.

Sometimes they spawn in instantly as a Super Infected but sometimes they have a delay or something.


I really wanted to have the Special Infected to spawn instantly with the health bonus and movement speed (Except tank) since I have Mutant Tanks on.

Psyk0tik
01-16-2021, 11:07
Yes, there's a delay. There is a 5-second delay before a special infected is turned into a "super boss" and a 7-second delay before they are turned into an "invisible boss". The probability only determines how often they can become a boss. Unfortunately, there is no setting to adjust the delay.

public Action:Event_Player_Spawn(Handle:event, String:event_name[], bool:dontBroadcast)
{

if(GetConVarInt(l4d_superboss_enable)==0) return Plugin_Continue;
new client = GetClientOfUserId(GetEventInt(event, "userid"));

if(GetClientTeam(client) == 3)
{
if(GetConVarInt(l4d_superboss_enable)!=0)
{
new class = GetEntProp(client, Prop_Send, "m_zombieClass");
new Float:p=GetConVarFloat(l4d_super_probability[class]);
new Float:r=GetRandomFloat(0.0, 100.0);
if(r<p) CreateTimer(5.0, CreatesuperBoss, client);
}
if(GetConVarInt(l4d_invisible_enable)!=0)
{
new class = GetEntProp(client, Prop_Send, "m_zombieClass");
new Float:p=GetConVarFloat(l4d_invisible_probabil ity[class]);
new Float:r=GetRandomFloat(0.0, 100.0);
if(r<p) CreateTimer(7.0, CreateInvisibleBoss, client);
}
}
return Plugin_Continue;
}

Maku
01-16-2021, 23:31
Ah, that's unfortunate...
Is there a way to modify the health and movement speed of the special infected rather than spawning them by chance as a super boss?

I know there is a cvar which edits health and other things since I have played with it before with the tank.

E.g:
z_jockey_health
z_jockey_leap_again_timer
z_jockey_leap_range
z_jockey_leap_time
z_jockey_limit

And I know it works when I used it on my server since I've set the sm_cvar z_minion_limit to "5" and saw 2 jockeys or hunters at once.
I also noticed that some of the special infected don't have health Cvars like the Boomer.

I was hoping there would be a plugin which could affect the health and movement speed of all the Special Infected, and Super Infected is the only plugin that I found that can do these things unfortunately...

Marttt
01-17-2021, 21:23
I also noticed that some of the special infected don't have health Cvars like the Boomer.

z_exploding_health : 50 : , "sv", "cheat" : Exploding Zombie max health

Check for z_exploding_* cvars for the boomer as well.

I usually search on this page (https://developer.valvesoftware.com/wiki/List_of_L4D2_Cvars).

###################

About the delay thing, take the code that Crasher pasted and edit the first parameter of "CreateTimer" in the source code.

Example:

CreateTimer(5.0, CreatesuperBoss, client);


5.0 means that it will fire 5 seconds later after the spawn.

In other words, just reduce this number to 1.0 or 0.1, to reduce the delay. (There is no cvar for it you have to do it manually)

Note: The delay could have a reason, some properties aren't available or don't change immediately at spawn, usually we wait for a frame (a frame has not a specific timing, depends on the server tick rate)

But try reducing it. Maybe works.

Maku
01-19-2021, 07:50
Yes, I have set the timer to 0.1 but not sure if it works instantly. I'll have to check it if it does.

Edit: It seems to work fine, I don't see any normal Special Infected during my gameplay. I'll mark this as solved and make a new thread if I have anymore problems with it, thanks!