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

Solved [L4D2] Super Infected Plugin Related


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Maku
Member
Join Date: Dec 2020
Location: United Kingdom
Old 01-16-2021 , 04:35   [L4D2] Super Infected Plugin Related
Reply With Quote #1

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.
Quote:
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.

Last edited by Maku; 01-19-2021 at 19:35. Reason: Solved
Maku is offline
Psyk0tik
Veteran Member
Join Date: May 2012
Location: Homeless
Old 01-16-2021 , 11:07   Re: [L4D2] Super Infected Plugin Related
Reply With Quote #2

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.

PHP Code:
public Action:Event_Player_Spawn(Handle:eventString: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(clientProp_Send"m_zombieClass");
            new 
Float:p=GetConVarFloat(l4d_super_probability[class]);
            new 
Float:r=GetRandomFloat(0.0100.0);
            if(
r<p)    CreateTimer(5.0CreatesuperBossclient);
        }
        if(
GetConVarInt(l4d_invisible_enable)!=0)
        {
            new class = 
GetEntProp(clientProp_Send"m_zombieClass");
            new 
Float:p=GetConVarFloat(l4d_invisible_probability[class]);
            new 
Float:r=GetRandomFloat(0.0100.0);
            if(
r<p)    CreateTimer(7.0CreateInvisibleBossclient);
        }        
    }
      return 
Plugin_Continue;

__________________
Psyk0tik is offline
Maku
Member
Join Date: Dec 2020
Location: United Kingdom
Old 01-16-2021 , 23:31   Re: [L4D2] Super Infected Plugin Related
Reply With Quote #3

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...
Maku is offline
Marttt
Veteran Member
Join Date: Jan 2019
Location: Brazil
Old 01-17-2021 , 21:23   Re: [L4D2] Super Infected Plugin Related
Reply With Quote #4

Quote:
Originally Posted by Maku View Post
I also noticed that some of the special infected don't have health Cvars like the Boomer.
Code:
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.

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

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

Example:
PHP Code:
CreateTimer(5.0CreatesuperBossclient); 
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.
__________________

Last edited by Marttt; 01-17-2021 at 21:32.
Marttt is offline
Maku
Member
Join Date: Dec 2020
Location: United Kingdom
Old 01-19-2021 , 07:50   Re: [L4D2] Super Infected Plugin Related
Reply With Quote #5

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!

Last edited by Maku; 01-19-2021 at 19:35. Reason: Additional comment
Maku 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 01:32.


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