Author Topic: Slayer Help  (Read 1355 times)

Is there a function for creating a Slayer Minigame?
If so what is it.

https://bitbucket.org/Greek2me/slayer/src/09b935661766429179f1aa23bf916173badbd2bf/Dependencies/Minigames.cs?at=dev#cl-90

Code: [Select]
Slayer.Minigames.addMinigame(%client, %configFile);
%configFile is a Slayer config file. You can find them in "config/server/Slayer". If not defined, the minigame will use default settings.

https://bitbucket.org/Greek2me/slayer/src/09b935661766429179f1aa23bf916173badbd2bf/Dependencies/Minigames.cs?at=dev#cl-90

Code: [Select]
Slayer.Minigames.addMinigame(%client, %configFile);
%configFile is a Slayer config file. You can find them in "config/server/Slayer". If not defined, the minigame will use default settings.

Thank you lord Jeblus!

Hold on, I have a problem. Whenever I use the thing for a second time it will only load default stuff and not the custom settings I'm using.
« Last Edit: February 07, 2014, 01:29:07 AM by xXDeadwolf456Xx »



So no?
I can not help since I can't see how you're using it, please post the code.

Hold on, I have a problem. Whenever I use the thing for a second time it will only load default stuff and not the custom settings I'm using.

What do you mean? Use the thing? Second time?

What do you mean? Use the thing? Second time?

Dont work fixed it.

Hold on, I have two problems

1) When I leave my minigame people don't spawn at the spawn points

2) I don't want people to be able to leave the minigame without making it default

Any idea how to do that?

Hold on, I have two problems

1) When I leave my minigame people don't spawn at the spawn points

2) I don't want people to be able to leave the minigame without making it default

Any idea how to do that?

1) Weird. Post your code.

2) You can package MinigameSO::canLeave(%this, %client). Make sure it only affects your minigame.

1) Weird. Post your code.

I don't really have any code for the minigames besides the command that creates them.
Since I have like... Four minigames at the same time.

Post the function where you create them.

Post the function where you create them.

The reason some of the minigames use the hub thing is because I was to lazy to make a new one. So I just load a fav.

Code: [Select]
function serverCmdStartCB(%client)
{

if(%client.bl_id == 18048)
{

    $CurMinigames = 2;

    exec("./slayer_GrappleKnife.cs");
messageClient(%client,'',"Creating: Grapple Knife");

$CurMinigames += 1;
Slayer.Minigames.addMinigame($CurMinigames, "Add-Ons/Server_ClubBlockland/General/MinigameStuff/slayer_GrappleKnife.cs");

exec("./slayer_Hub.cs");
messageClient(%client,'',"Creating: Hub");

$CurMinigames += 1;
Slayer.Minigames.addMinigame($CurMinigames, "Add-Ons/Server_ClubBlockland/General/MinigameStuff/slayer_Hub.cs");

messageClient(%client,'',"Creating: Prop Hunt");

$CurMinigames += 1;
Slayer.Minigames.addMinigame($CurMinigames, "Add-Ons/Server_ClubBlockland/General/MinigameStuff/slayer_Hub.cs");

messageClient(%client,'',"Creating: Meteor Jump");

$CurMinigames += 1;
Slayer.Minigames.addMinigame($CurMinigames, "Add-Ons/Server_ClubBlockland/General/MinigameStuff/slayer_Hub.cs");

}

}

Look at what I linked above and at the code I posted. Where does it say that you can just put a random integer into the %client parameter?

You can set %client to 0, but you can only create one minigame without a client like that (it will use the host BLID). Every minigame must be on a different BLID. BLIDs are what allows the minigame to determine what bricks, items, vehicles, etc. are in each minigame.