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

[L4D] Tank Spawn [Update 13. 08. 2017]


Post New Thread Reply   
 
Thread Tools Display Modes
Alexmy
Senior Member
Join Date: Oct 2014
Location: Russian Federation
Old 11-23-2019 , 11:09   Re: [L4D] Tank Spawn [Update 13. 08. 2017]
Reply With Quote #21

Quote:
Originally Posted by Sunyata View Post
Maybe so, but by adding a timer to MapStart and then adding/adjusting your timer-1 code to the MapStart routine, my other handshake plugin then makes a call to your updated MapStart routine to spawn tanks on those 15 custom maps. Maybe it's not the best way to write code, but at least it works for me now, and that's all that matters to me

PHP Code:
public void OnPluginStart()
{     
    
HookEvent("round_start"Event_RoundTank,  EventHookMode_Post); // also adjusted code in Event_RoundTank 
    
HookEvent("round_end"Event_RoundEnd,   EventHookMode_Post); // also adjusted code Event_RoundEnd
    
    
CreateTimer(30.0MapStart); // new code timer 

    
cleaner();
}

public 
Action:MapStart(Handle:timer)
{
    
CreateTimer(5.0SpawnTankTIMER_FLAG_NO_MAPCHANGE);  // new modified code timer

I did a map test city 17, and the plugin had nothing to cling to, since there is no necessary event. I quickly tested, the tank appeared immediately on the map city 17
Attached Files
File Type: sp Get Plugin or Get Source (l4d_tank_spawn.sp - 343 views - 7.1 KB)
Alexmy is offline
Sunyata
Senior Member
Join Date: Nov 2017
Location: Wherever I am
Old 11-24-2019 , 06:49   Re: [L4D] Tank Spawn [Update 13. 08. 2017]
Reply With Quote #22

Well done, so adding your extra bit of code to MapStart below solved that problem:

PHP Code:
if (Timer_1 != null)
    {
        
delete(Timer_1);
        
Timer_1 null;
    }
    
Timer_1 CreateTimer(GetRandomInt(01) ? GetConVarFloat(sm_FirstTank_Random_1) : GetConVarFloat(sm_FirstTank_Random_2), SpawnTank_TIMER_FLAG_NO_MAPCHANGE); 
I only tested this latest plugin of yours on Map ones of City 17 and Carnage and the tanks started to spawn properly, just as it had done for all the official maps. I didn't test your plugin on the other 13 custom maps above, but if it's doing it for the maps we tested, then we can assume it will do it for all the other custom maps that would have had this issue too. Nice one.

One other suggestion: I would set your plugin convars to be 'on' by default, as it's currently set to 'off.'

Last edited by Sunyata; 11-24-2019 at 06:53. Reason: added php to code
Sunyata is offline
Mitsuru
Member
Join Date: Jun 2013
Location: Fakes country
Old 03-23-2020 , 22:32   Re: [L4D] Tank Spawn [Update 13. 08. 2017]
Reply With Quote #23

Quote:
Originally Posted by Alexmy View Post
What do you mean? Are you talking about it?
PHP Code:
sm_FirstTank_Random_2     CreateConVar("sm_FirstTank_Random_2",     "120.0",   "Random time the first tank on a normal map.",          FCVAR_NOTIFY);
sm_NextTank_Random_2      CreateConVar("sm_NextTank_Random_2",      "240.0",   "A random time the next tank.",                         FCVAR_NOTIFY); 
If it is, you can, put the same time or just delete this part of the code.
Sorry,Late response, I don't want the tank spawned by the director.Sometimes I do not need tanks{{{(>_<)}}}
Mitsuru is offline
Marttt
Veteran Member
Join Date: Jan 2019
Location: Brazil
Old 03-24-2020 , 13:56   Re: [L4D] Tank Spawn [Update 13. 08. 2017]
Reply With Quote #24

I don't know if disabling director spawn it wouldn't bug the finale maps,
I'm not sure but...I think for some of them it is necessary to kill two tanks to the rescue arrives.
But I know a way to do it if you want.
__________________
Marttt is offline
Mitsuru
Member
Join Date: Jun 2013
Location: Fakes country
Old 07-27-2020 , 09:34   Re: [L4D] Tank Spawn [Update 13. 08. 2017]
Reply With Quote #25

Quote:
Originally Posted by Marttt View Post
I don't know if disabling director spawn it wouldn't bug the finale maps,
I'm not sure but...I think for some of them it is necessary to kill two tanks to the rescue arrives.
But I know a way to do it if you want.
I use the stripper to trigger the tank, the director's tank is useless(Except for the finale).
Causes of map defects...l4d1

Last edited by Mitsuru; 07-27-2020 at 20:35.
Mitsuru 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 19:05.


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