Procedural Terrain Generator v3 [Working on v3.1]

Author Topic: Procedural Terrain Generator v3 [Working on v3.1]  (Read 100477 times)







I like this, this is hot


Bump! I'm working on the 3.1 update to PTG, and noticed that bots don't respawn when resetting a minigame, if the bot hole spawn bricks are under public ownership. Also if bots are forcibly reset using .respawnBot(); or .spawnHoleBot();, they don't take damage, which seems to be due to how hole bots are handled, rather than an issue related to PTG.


I'm using the following packaged function to force-respawn bots under public ownership:
Code: [Select]
function MinigameSO::Reset(%obj,%cl) //void function
{
Parent::Reset(%obj,%cl);

if(isObject(mainHoleBotBrickSet))
{
for(%c = 0; %c < mainHoleBotBrickSet.getCount(); %c++)
{
%tmpBotHole = mainHoleBotBrickSet.getObject(%c);

if(getBrickGroupfromObject(%tmpBotHole).getName() $= "BrickGroup_888888")
{
%tmpBotHole.respawnBot();
}
}
}
}
Is there a better way to force bots under public ownership to respawn when a minigame is reset, and to allow them to take damage after being reset?

Edit: I'll just add a toggle option to generate them under the host's brickgroup
« Last Edit: February 01, 2016, 11:59:15 PM by [GSF]Ghost »

I'm pretty sure that you just need to enable "Use All Players' Bricks" in the minigame, rather than that bit of code.

Thanks, enabling the option did allow them to take damage. Although, for some reason they still don't respawn without the script, so I may need to keep it.