How do I set a default player for a gamemode?

Author Topic: How do I set a default player for a gamemode?  (Read 876 times)

I've seen gamemodes with custom players, but I want to know how.

Code: [Select]
package GamemodePackage
{
function GameConnection::CreatePlayer(%this, %spawn)
{
%return = Parent::CreatePlayer(%this, %spawn);

if(isObject(%this.player))
{
%this.player.setDataBlock(NameOfPlayerType);
}

return %return;
}
activatePackage(GamemodePackage);
This, if anyone has a easier way do tell

Pretty sure you can just set the minigame variables from the gamemode.txt

Code: [Select]
package GamemodePackage
{
function GameConnection::CreatePlayer(%this, %spawn)
{
%return = Parent::CreatePlayer(%this, %spawn);

if(isObject(%this.player))
{
%this.player.setDataBlock(NameOfPlayerType);
}

return %return;
}
activatePackage(GamemodePackage);
This, if anyone has a easier way do tell

Thanks!

Pretty sure you can just set the minigame variables from the gamemode.txt
Yep, it has to be the ui name of that datablock too