Poll

?

.
84 (71.2%)
,
34 (28.8%)

Total Members Voted: 116

Author Topic: Slayer  (Read 233426 times)

I know, I'm pretty much rewriting the entire thing. I've learned a lot since I started writing it more than a year ago.

Normal minigames have an owner (the creator). The minigame uses their bricks and stuff so that when it resets it only respawns their vehicles, etc. But Slayer minigames don't have an owner because then it wouldn't work properly when they leave the server. So I need to figure out which bricks belong to which minigame. Or I could just have all bricks belong to every minigame and then only reset vehicles without passengers in them or something like that.

Ok, I'm not fully understanding, is this something like what you mean?

Bob has 3 vehicle spawns down, and creates a slayer minigame. He then leaves the slayer minigame and creates a new slayer minigame.

If this is what you mean, when someone creates a slayer minigame, loop through all of the players bricks and maybe do something like:

function whensomeonecreatesaslayermini game(%client)
{
   //these functions with brickgroup things are probably wrong, but you get the point
   
   %bg = %client.getBrickGroup(); //lol
   
   for(%i=0;%i<%bg.getCount(); %i++)
   {
      %b = %bg.getObject(%i);
      
      if(%b.minigame $= "")
      {
         %b.minigame = %client.minigame;
      }
      else
      {
         %b.minigame = %b.minigame SPC %client.minigame;
      }
   }
}


So bob created 2 slayer minigames, if you echo(%somebrickthatbelongstobob.minigame); it'll probably look like 2323 3232 (2 minigames for the 3 vehicle spawns)

You are probably going to have to package a few functions like getminigamefromobject(); (i think that's what it is)
and possibly rewrite them. This is all off the top of my head, if someone has a better idea, I'm sure they'll let you know and if I come up with something better, i'll let you know lol.


I would really prefer the map-rotation feature over the multiple minigames.

I would really prefer the map-rotation feature over the multiple minigames.
I want to finish rewriting Slayer first so that I don't have to rewrite them both later. Also, I probably won't be getting very much done until break anyway.

I would really prefer the map-rotation feature over the multiple minigames.

Hey what a coincidence, i just wrote a map rotation script for my CTF minigame, you should come check it out :).

How does this look better than TDM?

Anyways, I have a rant/suggestion/request. When I set up teams, I have to manually enter each player's name; in TDM, you could select from a list.

Hey what a coincidence, i just wrote a map rotation script for my CTF minigame, you should come check it out :).
Very nice, I have a working one that cycles the map, build, and minigame settings but I still need to finish the GUI for it and all that other user-friendly stuff.

How does this look better than TDM?

Anyways, I have a rant/suggestion/request. When I set up teams, I have to manually enter each player's name; in TDM, you could select from a list.
It's an opinion that a lot of people have.

And yes that would be nice but I don't have time right now. Also, if you created the teams after setting up your team minigame, simply change the gamemode to a non-team gamemode and then back to a team gamemode and everyone will be automatically sorted into teams.

I really only need this for my TDM I am putting up today. I guess I need to thank Greek for that :).

Will you be adding any support of bots?
Or support of bot events?

You should add support so other people can easily code things to work with your mod.
For example, for your CTF, you can have a function that calls something like slayer_ctf_onScore() or slayer_ctf_onFlagReset() or slayer_ctf_onFlagDrop() etc, I know you have player::onpickup and fxdtsbrick::resetflag etc, but these would be easier to find and package and all of that stuff if they were in their own txt file telling you how they are called and what they return. Just my thoughts.

You should add support so other people can easily code things to work with your mod.
For example, for your CTF, you can have a function that calls something like slayer_ctf_onScore() or slayer_ctf_onFlagReset() or slayer_ctf_onFlagDrop() etc, I know you have player::onpickup and fxdtsbrick::resetflag etc, but these would be easier to find and package and all of that stuff if they were in their own txt file telling you how they are called and what they return. Just my thoughts.
Interesting, I think I'll do that. Thanks for the tip.

Ok, so I've almost finished rewriting all of the server-sided code. Still have to rewrite the client, make a few GUIs, make things more compatible, and TONS of other stuff. But anyway does anyone have a good idea for file organization? I have a few but I want some other input.

What do you mean exactly, by file organization?

As in how the folders and stuff should be organized, whether I should have all the code in a few bigger files or the way it is right now in a bunch of smaller files, etc.

Also, I figured out a good way of seeing which bricks/vehicles/stuff are in which minigame.

Greek, when the teams "shuffle" after rounds, can you make it randomly shuffle the teams? If you have two teams it just switches which side everyone is on, keeping the same teams every round. I find this unhelpful.

Greek, when the teams "shuffle" after rounds, can you make it randomly shuffle the teams? If you have two teams it just switches which side everyone is on, keeping the same teams every round. I find this unhelpful.

Yeah do this, randomize the teams.

Also I'd organize it by what the code contains.
Packages should be in a packages folder, objects should be in an objects folder etc etc.

How did you do the minigame thing?