Raised This Month: $ Target: $400
 0% 

[L4D2] How to get the moment of swapping teams' places in versus/scavenge


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
ZzZombo
Member
Join Date: May 2012
Location: Ravenholm
Old 05-19-2012 , 00:51   [L4D2] How to get the moment of swapping teams' places in versus/scavenge
Reply With Quote #1

Hello there! I need to capture the moment of teams swapping their roles after one ended their way in competive game modes.

Last edited by ZzZombo; 05-19-2012 at 00:52. Reason: spelling
ZzZombo is offline
Dr. Greg House
Professional Troll,
Part-Time Asshole
Join Date: Jun 2010
Old 05-19-2012 , 08:43   Re: [L4D2] How to get the moment of swapping teams' places in versus/scavenge
Reply With Quote #2

Try these:

http://wiki.alliedmods.net/Left_4_De...round_halftime
or
http://wiki.alliedmods.net/Left_4_De...round_finished (It might be this one because there's a scavenge_match_finished as well)

Try http://wiki.alliedmods.net/Left_4_De...ents#round_end for versus.

Well I'm afraid this one is all about trial&error for you. Log the events and play a few games to get some results.

Last edited by Dr. Greg House; 05-19-2012 at 08:43.
Dr. Greg House is offline
TrueSurvivor
Member
Join Date: Jun 2010
Old 05-19-2012 , 18:09   Re: [L4D2] How to get the moment of swapping teams' places in versus/scavenge
Reply With Quote #3

Depends on what you're doing with this, round_end works just fine as it's called on any round end.
You have 2 round_ends each Versus map.

Basicly you could start with this;
PHP Code:
new iRound;

Public 
OnPluginStart()
{
    
HookEvent("round_start"RoundStart);
}
public 
OnMapEnd()
{
    
//Reset Round Number
    
iRound 0;
}

Public 
RoundStart(Handle:event, const String:name[], bool:dontBroadcast)
{
    
//Add to Round Number
    
iRound++;

If you want to do something in a specific round you can just use "if" to check what Round it is.
TrueSurvivor 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:36.


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