Slayer | New Bugfix Update

Poll


Currently not accepting donations.
Thank you for your support!


Announcements:

  • Help wanted! I don't have time to work on Slayer. If you want bugfixes/features, lend a hand. Post in the thread if you're interested!
  • [2016/11/29] Slayer update released (p59). Lots of bug fixes.
  • [2016/12/23] Slayer update released (p60).
  • [2017/01/11] CTF updated! New events and more. (p60)

Author Topic: Slayer | New Bugfix Update  (Read 217278 times)

I didn't like that the minigame > win event didn't allow multiple teams to win. So I fixed that.

Code: [Select]
function MiniGameSO::Win(%this, %mode, %flag, %client)
{
if(isObject(%client) && getMinigameFromObject(%client) != %this)
return;

if(!isSlayerMinigame(%this))
return;

switch(%mode)
{
case 0: //TRIGGERPLAYER
if(isObject(%client))
%this.endRound(%client);

case 1: //TRIGGERTEAM
if(isObject(%client))
{
%team = %client.getTeam();
if(isObject(%team))
%this.endRound(%team);
}

case 2: //CUSTOMPLAYER
%cl = findClientByName(%flag);
if(isObject(%cl))
%this.endRound(%cl);

case 3: //CUSTOMTEAM
%flag = StrReplace(%flag,",","\t");
%count = getFieldCount(%flag);
%team = %this.Teams.getTeamFromName(getField(%flag,0));
for(%x=1;%x<%count;%x++)
%team = %team TAB %this.Teams.getTeamFromName(getField(%flag,%x));
if(isObject(getField(%team,0)))
%this.endRound(%team);

case 4: //CUSTOMSTRING
%this.endRound("CUSTOM" TAB %flag);

case 5: //NONE
%this.endRound();
}
}

Not sure why, but when I create a new minigame or reset the current one, I get extreme lag for the first like 2-3 seconds - Nothing major, just sorta wondering why this happens

Why don't team spawn points work? Am I doing something wrong?
https://www.youtube.com/watch?v=eArdiFjuwPA&feature=youtu.be
« Last Edit: November 13, 2017, 06:12:05 PM by Sideswipe »

Would it be possible to add a team whitelist feature? Basically if a team requires a whitelist it can't be joined unless an admin does a command along the lines of /addwhitelist (player) (team). Persistence for this would be nice.

Would it be possible to add a team whitelist feature? Basically if a team requires a whitelist it can't be joined unless an admin does a command along the lines of /addwhitelist (player) (team). Persistence for this would be nice.

o yis

Why don't team spawn points work? Am I doing something wrong?
https://www.youtube.com/watch?v=eArdiFjuwPA&feature=youtu.be

You probably are. Your video isn't very useful. Do that again, but post the config/server/Slayer/debug_server.log file after you close Blockland.

Would it be possible to add a team whitelist feature? Basically if a team requires a whitelist it can't be joined unless an admin does a command along the lines of /addwhitelist (player) (team). Persistence for this would be nice.

Already exists, minus the persistence. Create a team that has autosort turned off and is locked. Then the admin can move players to it manually.

I didn't like that the minigame > win event didn't allow multiple teams to win. So I fixed that.

Code: [Select]
function MiniGameSO::Win(%this, %mode, %flag, %client)
{
if(isObject(%client) && getMinigameFromObject(%client) != %this)
return;

if(!isSlayerMinigame(%this))
return;

switch(%mode)
{
case 0: //TRIGGERPLAYER
if(isObject(%client))
%this.endRound(%client);

case 1: //TRIGGERTEAM
if(isObject(%client))
{
%team = %client.getTeam();
if(isObject(%team))
%this.endRound(%team);
}

case 2: //CUSTOMPLAYER
%cl = findClientByName(%flag);
if(isObject(%cl))
%this.endRound(%cl);

case 3: //CUSTOMTEAM
%flag = StrReplace(%flag,",","\t");
%count = getFieldCount(%flag);
%team = %this.Teams.getTeamFromName(getField(%flag,0));
for(%x=1;%x<%count;%x++)
%team = %team TAB %this.Teams.getTeamFromName(getField(%flag,%x));
if(isObject(getField(%team,0)))
%this.endRound(%team);

case 4: //CUSTOMSTRING
%this.endRound("CUSTOM" TAB %flag);

case 5: //NONE
%this.endRound();
}
}

Nice! If I ever put out another update I'll add that.

Not sure why, but when I create a new minigame or reset the current one, I get extreme lag for the first like 2-3 seconds - Nothing major, just sorta wondering why this happens

Hmm. Are you on the latest version? This used to be a problem relating to number of bricks.

You probably are. Your video isn't very useful. Do that again, but post the config/server/Slayer/debug_server.log file after you close Blockland.

Nevermind, I found a different way to make each team spawn in a different place.
On a Global Spawn Point...

onPlayerTouch(Teamwhatever) > Self > setPlayerTransform [Desired spawn point brick]

That works. It's possible that you have a mod conflicting with normal team spawning.

How would you guys suggest I go about setting up a VIP/leader gamemode with Slayer?

I know that there's this old gamemode made by HellsHero, but I haven't used it in years, and I suspect that it isn't so compatible with the latest version of Slayer (hopefully I'm wrong tho).

If that mod doesn't work out, are there any other ways I could get a VIP mode working? I'm going to need a setup where  only one team has a VIP, but being able to have one per team would be cool too.

Slayer has great backwards-compatibility, so I have a feeling that mod still works.

If it doesn't, you can do a setup like this:
 - enable "Ally Same Colors" setting
 - Create two teams with the same color. Set the Max Players for one of these teams to 1. This is the VIP.
 - Create another team with a different color. (optionally create a 4th team for a second VIP)
 - Optionally add an event for onPlayerDeath(VIP-team-number)->Minigame->Win[Other Team]



Apparently this is reply 1000:


Maybe a good time to mention that although Blockland has declined a lot, Slayer still has ~500 daily users!
« Last Edit: November 14, 2017, 05:11:09 PM by Greek2me »

- Optionally add an event for onPlayerDeath(VIP-team-number)->Minigame->Win[Other Team]
Problem with this is that either the VIPs either don't win, or the regular players don't win. I know they can just, 'feel like' they won. But the game is legit telling them defeat, and the scoreboard shows that they did not get a win. The minigame win event doesn't consider allies.

Oh! I will have to fix that. Maybe I'll procrastinate on work enough to put a patch out in the next week.

Will there ever be a cops and robbers gamemode?

any idea on how to make a koth mode