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

Solved L4D1 Disable director tank spawn on certain maps


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
finishlast
Senior Member
Join Date: Nov 2018
Location: In Reno with the vitamin
Old 07-19-2022 , 14:11   L4D1 Disable director tank spawn on certain maps
Reply With Quote #1

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.
__________________

Last edited by finishlast; 07-28-2022 at 13:14.
finishlast is offline
Silvers
SourceMod Plugin Approver
Join Date: Aug 2010
Location: SpaceX
Old 07-19-2022 , 14:45   Re: L4D1 Disable director tank spawn on certain maps
Reply With Quote #2

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.
__________________

Last edited by Silvers; 07-19-2022 at 14:46.
Silvers is offline
finishlast
Senior Member
Join Date: Nov 2018
Location: In Reno with the vitamin
Old 07-20-2022 , 10:04   Re: L4D1 Disable director tank spawn on certain maps
Reply With Quote #3

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;
}

__________________

Last edited by finishlast; 07-22-2022 at 13:18.
finishlast is offline
finishlast
Senior Member
Join Date: Nov 2018
Location: In Reno with the vitamin
Old 07-26-2022 , 07:24   Re: L4D1 Disable director tank spawn on certain maps
Reply With Quote #4

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"

__________________

Last edited by finishlast; 07-28-2022 at 13:18.
finishlast is offline
ZBzibing
Senior Member
Join Date: Dec 2012
Old 09-14-2022 , 15:31   Re: L4D1 Disable director tank spawn on certain maps
Reply With Quote #5

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"
}
__________________
Please forgive, If I'm not describing it accurately. I use google translate
Functional tests are all from L4D1, and are only keen to solve and fix various bugs of L4D1:
ZBzibing is offline
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 08:48.


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