Welcome to Open Carnage

A resource for Halo 1 modding and tech, with unique means of rewarding individual content creation and support. Have a wander to see why we're worth the time! EST. 2012

Sign in to follow this  
Followers 0
Kavawuvi

Team Shuffler

35 posts in this topic

This script will shuffle teams every few team games. It will shuffle teams only in the very beginning of the game (by default, after 5 seconds have passed and every three team games).


It also provides admins with a command to manually shuffle the teams, which can be assigned to a custom command in commands.txt: 

shuffle_teams 'lua_call shuffler ShuffleTeams' 4

Know that shuffling teams will kill all players, not just the players who are changing teams.

Download (SAPP): shuffler.lua

Tucker933 and Krazychic like this

Share this post


Link to post
Share on other sites

Members of Open Carnage never see off-site ads.

I just joined my server, to make it 4v3, in favour of red team. Someone joined shortly thereafter, in the middle of the game, to make it 5v3; an admin. had told me it was giving similar troubles, earlier, as well.

 

Thought to help work out the kinks, by posting here.


As a point of clarification, the same admin. has said that he was attempting to reset the map, himself (because no 'hogs spawned on one side of the map), just after it warned that the teams will be shuffled. Maybe that helps you find the problem (if any).


b_350x20_C957F6A-000000-FFFFFF-750A0E.pn

b_350x20_C957F6A-000000-FFFFFF-750A0E.pn

b_350x20_C957F6A-000000-FFFFFF-750A0E.pn

Share this post


Link to post
Share on other sites

Your problem should be fixed in this update.

It is, yeh—thanks! Now, however, the 'hog spawns don't change, as they would do with a map reset.

 

So, with how Halo will usually spawn 'hogs relative to the number of people within the vacinity, upon the shuffle being executed, it's usually a case that plenty are left without a vehicle.


 

Joined the same server, earlier, and noticed a couple people with negative values under the "Deaths" column.

 

Asked if the teams were shuffled at the start of the map, to which a fellow admin. confirmed that they had been.

 

Here's a screenshot:

 

http://classic.xfire.com/profile/juhleek/screenshots/130137882/?view#130137882


b_350x20_C957F6A-000000-FFFFFF-750A0E.pn

b_350x20_C957F6A-000000-FFFFFF-750A0E.pn

b_350x20_C957F6A-000000-FFFFFF-750A0E.pn

Share this post


Link to post
Share on other sites

Okay. Give this attached version a try, then. I've removed reducing death count reduction and just used SAPP's method of changing teams. It might work better. My theory is that SAPP might still be thinking that the player is still alive even when I killed them programmatically, as SAPP also reduces death count when changing teams. In which case, this may be a bug with SAPP and I will need to report it. I'll look into this bug further, this script has a workaround for it.

Edited by 002
JuliquE likes this

Share this post


Link to post
Share on other sites

Works better, yeh.

 

Noticed, though, that, after the teams are shuffled, there's always one person with -1 deaths (vs. a couple, before); this person will have a count-down, before spawning, unlike everyone else spawning instantly. Upon being killed, however, he/she will spawn instantly (deaths, now, equal to zero).

 

Also, there doesn't seem to be an issue with 'hog spawns, anymore. I take it you addressed that?

 

Thanks, again, for this.


Okay. Give this attached version a try, then. I've removed reducing death count reduction and just used SAPP's method of changing teams. It might work better. My theory is that SAPP might still be thinking that the player is still alive even when I killed them programmatically, as SAPP also reduces death count when changing teams. In which case, this may be a bug with SAPP and I will need to report it. I'll look into this bug further, this script has a workaround for it.

 

attachicon.gifshuffler.lua


b_350x20_C957F6A-000000-FFFFFF-750A0E.pn

b_350x20_C957F6A-000000-FFFFFF-750A0E.pn

b_350x20_C957F6A-000000-FFFFFF-750A0E.pn

Share this post


Link to post
Share on other sites

Noticed, though, that, after the teams are shuffled, there's always one person with -1 deaths (vs. a couple, before); this person will have a count-down, before spawning, unlike everyone else spawning instantly. Upon being killed, however, he/she will spawn instantly (deaths, now, equal to zero).

I'm not sure why that is, as this plugin no longer messes with the death count. It would have to be either another plugin, or a bug with SAPP. Hmm... Edited by 002

Share this post


Link to post
Share on other sites

I'm not sure why that is, as this plugin no longer messes with the death count. It would have to be either another plugin, or a bug with SAPP. Hmm...

 

Either way, I'd say it really works well enough; hardly worth racking your brain over.

 

Cheers, mate.

 

 

::EdiT::

 

Didn't, at first, recognize that "plugin" was interchangeable with "script"; still relatively new to this.

 

If it helps, I'm quite sure, from the sounds of it, that this is a problem on my end.

 

As said, it's working great, at the minute, and all things considered.

Edited by JuliquE

b_350x20_C957F6A-000000-FFFFFF-750A0E.pn

b_350x20_C957F6A-000000-FFFFFF-750A0E.pn

b_350x20_C957F6A-000000-FFFFFF-750A0E.pn

Share this post


Link to post
Share on other sites

There still appears to be a problem with the vehicles remaining where they originally spawned, relative to where the players originally spawned; I might have lucked out, once or twice, leaving the impression the issue were resolved.

 

We normally just reset the map to fix that, which I thought, if it could be made to reset the map after shuffling the teams, the script would be seamless. =)


b_350x20_C957F6A-000000-FFFFFF-750A0E.pn

b_350x20_C957F6A-000000-FFFFFF-750A0E.pn

b_350x20_C957F6A-000000-FFFFFF-750A0E.pn

Share this post


Link to post
Share on other sites

There still appears to be a problem with the vehicles remaining where they originally spawned, relative to where the players originally spawned; I might have lucked out, once or twice, leaving the impression the issue were resolved.

 

We normally just reset the map to fix that, which I thought, if it could be made to reset the map after shuffling the teams, the script would be seamless. =)

Try this then. This script will execute sv_map_reset after shuffling teams.

shuffler.lua

JuliquE likes this

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0
  • Recently Browsing   0 members

    No registered users viewing this page.