AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting (https://forums.alliedmods.net/forumdisplay.php?f=107)
-   -   Solved L4D1 Disable director tank spawn on certain maps (https://forums.alliedmods.net/showthread.php?t=338661)

finishlast 07-19-2022 14:11

L4D1 Disable director tank spawn on certain maps
 
Hi,

is there a way to block director initiated tank spawns?

I want to block the tank on l4d_vs_smalltown03_ranchhouse in l4d1.

I spawn one by a custom event and don't want the director to spawn one too.

How does the director know that he is supposed to spawn one anyways?

Thx.

Silvers 07-19-2022 14:45

Re: L4D1 Disable director tank spawn on certain maps
 
You could use forward Action L4D_OnGetMissionVSBossSpawning(float &spawn_pos_min, float &spawn_pos_max, float &tank_chance, float &witch_chance); from left4dhooks and set 0.0 tank chance and return Plugin_Changed. Probably would do it, since this is for Versus mode.

finishlast 07-20-2022 10:04

Re: L4D1 Disable director tank spawn on certain maps
 
Thx once again silvers, seems to work! Very good!

PHP Code:

#pragma semicolon 1
#pragma newdecls required

#include <sourcemod>
#include <sdktools>
#include <left4dhooks>
#define PLUGIN_VERSION        "1.0"

public Plugin myinfo =
{
    
name "[L4D] Disable director tank",
    
author "Finishlast",
    
description "[L4D] Disable director tank",
    
version PLUGIN_VERSION,
    
url ""
}


public 
Action L4D_OnGetMissionVSBossSpawning(float &spawn_pos_minfloat &spawn_pos_maxfloat &tank_chancefloat &witch_chance)
{


char sMap[64];
GetCurrentMap(sMapsizeof(sMap));
if (
StrEqual(sMap"l4d_vs_smalltown03_ranchhouse"false))
{    
    
tank_chance 0.0;
    return 
Plugin_Changed;
}
else
{
    return 
Plugin_Continue;
}



finishlast 07-26-2022 07:24

Re: L4D1 Disable director tank spawn on certain maps
 
mmmmh just found out, the tank spawned by stripper is an AI tank. Wonder why.

Geesh.

OK so must be because the tank is spawned wrong.

Anyone know why this spawns a tank in l4d

PHP Code:

...
"OnStartTouch" "z_spawn_tank1,SpawnZombie,tank,3,-1"
}
add:
{
    
"origin" "-12790 -4480 282"
    "targetname" "z_spawn_tank1"
    "angles" "0 0 0"
    "classname" "commentary_zombie_spawner"


The spawned tank is AI tank.

PHP Code:

...
"OnStartTouch" "z_spawn_tank1,SpawnZombie,,3,-1"
}

add:
{
    
"targetname" "z_spawn_tank1"
    "origin" "-12790 -4480 282"
    "population" "tank"
    "offer_tank" "1"
    "angles" "0 0 0"
    "classname" "info_zombie_spawn"


And this simply does nothing? I mean I see no spawned tank at all.

According to the valve documentation I have to use info_zombie_spawn but nothing happens in l4d1?!

Update:

nevermind, I didn't have a population for tank, silly me.

I just use the sacrifice tank population now, works like a charm...
So if anyone got a problem with info_zombie_spawn should check in /scripts population file, if there is an according entry...

PHP Code:

add:
{
    
"targetname" "z_spawn_tank1"
    "origin" "-12790 -4480 282"
    "population" "tankriver_docks_trap"
    "offer_tank" "1"
    "angles" "0 0 0"
    "classname" "info_zombie_spawn"



ZBzibing 09-14-2022 15:31

Re: L4D1 Disable director tank spawn on certain maps
 
l4d_hospital01_apartment.cfg
Code:

//安全室门口触发坦克
 modify:
{
        match:
        {
                "model" "*115"
        }
        insert:
        {
                "OnStartTouch" "ZB_T,SpawnZombie,Tank Tank,0,1"
        }
}
//特感出生位置
add:
{
        "origin" "3125 3520 -200"
        "targetname" "ZB_T"
        "classname" "commentary_zombie_spawner"
}



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

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