Blockland Forums > Modification Help

Auto Creating A Minigame

Pages: (1/4) > >>

jes00:

How would you make a script that auto creates a minigame when you start a server?

Nasoa:

KINEX made this.

jes00:


--- Quote from: Nasoa on August 22, 2011, 08:47:17 PM ---KINEX made this.

--- End quote ---
Where?

Wesley Williams:


--- Quote from: Nasoa on August 22, 2011, 08:47:17 PM ---KINEX made this.

--- End quote ---

Except it only worked for deathmatch (I think).


--- Quote from: jes00 on August 22, 2011, 08:49:44 PM ---Where?

--- End quote ---

Scattered Space


jes00:

I know Iban has made this in his CityRPG mod.

--- Code: ---function CityRPG_BuildMinigame()
{
if(isObject(CityRPGMini))
{
for(%i = 0;%i < ClientGroup.getCount();%i++)
{
%subClient = ClientGroup.getObject(%i);
CityRPGMini.removeMember(%subClient);
}

CityRPGMini.delete();
}
else
{
for(%i = 0;%i < ClientGroup.getCount();%i++)
{
%subClient = ClientGroup.getObject(%i);
%subClient.minigame = NULL;
}
}

new scriptObject(CityRPGMini)
{
class = miniGameSO;

brickDamage = true;
brickRespawnTime = 10000;
colorIdx = -1;

enableBuilding = true;
enablePainting = true;
enableWand = true;
fallingDamage = true;
inviteOnly = false;

points_plantBrick = 0;
points_breakBrick = 0;
points_die = -1;
points_killPlayer = 1;
points_killSelf = -1;

playerDatablock = playerNoJet;
respawnTime = 0;
selfDamage = true;

playersUseOwnBricks = false;
useAllPlayersBricks = true;
useSpawnBricks = false;
VehicleDamage = true;
vehicleRespawnTime = 10000;
weaponDamage = true;

numMembers = 0;

// Special:
vehicleRunOverDamage = false;
};

for(%i = 0;%i < ClientGroup.getCount();%i++)
{
%subClient = ClientGroup.getObject(%i);
CityRPGMini.addMember(%subClient);
}

CityRPGMini.playerDatablock.maxTools = 7;
}
--- End code ---


Pages: (1/4) > >>

Go to full version