Author Topic: Someone explain to me why Gamemode_Zapt and Gamemode_Zombie are broken to stuff.  (Read 1785 times)


Maybe you should say what's wrong.

Im guessing you're running both at the same time

gamemode zombie for one was written way back in v8 and probably has more than a few incompatibilities. its also known to crash people so yeah.

zapt was more recent and may still work but i believe certain parts are broken due to once again updates changing or removing functionality. i dont recall any cases where it crashes people though

if any of them used the aiconnection class then they'll be broken. not sure if they did, but it wasn't uncommon practice back then. i seem to remember that they were broken before it was removed tho

ZAPT has two problems, one being the smasher zombie which became broken in one of Blockland's updates. The other is you need to replace zombie spawns every time you load up a map and want to use ZAPT. Don't use slayer for ZAPT.

As for GM Zombie I'm not too familiar with. You should really post what's wrong.

ZAPT has two problems, one being the smasher zombie which became broken in one of Blockland's updates. The other is you need to replace zombie spawns every time you load up a map and want to use ZAPT. Don't use slayer for ZAPT.

As for GM Zombie I'm not too familiar with. You should really post what's wrong.

You just described what was wrong with zapt, but with Gamemode_Zombie When I used the same method, the zombie don't spawn at all. But if I place more spawns while the minigame is running, they work.
But after I reset it, they don't spawn again.

A fixed zapt would be amazing. I hope someone can figure out if it can be fixed.

The updates had break them overtime. I requested a remake of them and, none of them went far. I would liked to see a remake of the zombie game modes.

I just want a functional AI director you could tie to spawners and give him options of what he could spawn where and when.

Also a remake of the different zombie types. Outside of that they don't necessarily need a remake; though I wouldn't mind.

You just described what was wrong with zapt, but with Gamemode_Zombie When I used the same method, the zombie don't spawn at all. But if I place more spawns while the minigame is running, they work.
But after I reset it, they don't spawn again.

Are you using slayer? If you are don't use it for either of these. The problem could be a multitude of things, most probably if you're running both at the same time or just the fact they're both really old.

Slayer should be compatible with ZAPT. It will place the ZAPT settings in the Advanced tab, and there might be an option in there that you need to enable for the Director to start.

ZAPT uses AIConnection

edit: Here's the code that uses it
Code: [Select]
function zombieBot(%obj)
{
if(isObject(%obj))
{
if(%obj.getClassName() $= "AIConnection")
{
return true;
}
else if(%obj.getClassName() $= "GameConnection")
{
return false;
}
else
{
%client = %obj.client;

if(!isObject(%client) || %client.getClassName() !$= "GameConnection")
{
return true;
}
else
{
return false;
}
}
}

return false;
}

Code: [Select]
function AIConnection::onDrop(%client, %reason)
{
if(%client.zombieSmasherAI)
{
%client.onClientLeaveGame();
removeFromServerGuidList(%client.guid);
removeTaggedString(%client.name);
}
else
{
return Parent::onDrop(%client, %reason);
}
}
Code: [Select]
function ZombieSmasherArmor::zombieSpecial(%this, %obj)
{
if(isObject(%obj) && !%obj.isCrouched())
{
%start = %obj.getPosition();
%end = vectorSub(%start, "0 0 1");
%masks = ($TypeMasks::FxBrickObjectType | $TypeMasks::PlayerObjectType | $TypeMasks::StaticObjectType | $TypeMasks::TerrainObjectType | $TypeMasks::VehicleObjectType);

%ground = getWord(containerRayCast(%start, %end, %masks, %obj), 0);

if(isObject(%ground))
{
%start = %obj.getEyePoint();
%aimVec = %obj.zombieAimVec();
%end = vectorAdd(%start, vectorScale(%aimVec, 3));
%masks = ($TypeMasks::FxBrickObjectType | $TypeMasks::PlayerObjectType | $TypeMasks::StaticObjectType | $TypeMasks::TerrainObjectType | $TypeMasks::VehicleObjectType);

%wall = getWord(containerRayCast(%start, %end, %masks, %obj), 0);

if(!isObject(%wall))
{
%energy = %obj.getEnergyLevel();

if(%energy >= 80)
{
%obj.changeDatablock(ZombieSmasherChargingArmor);
%this.zombieCameraSpectate(%obj);

%conn = new AIConnection()
{
bl_id = 1337;
connected = true;
hasSpawnedOnce = false;
name = "Prosmasher666";
zombieSmasherAI = true;
};

MissionCleanup.add(%conn);

%conn.setControlObject(%obj);
%conn.setMove("y", true);
%obj.zombieChargerConn = %conn;
%obj.zombieChargingSched = ZombieSmasherChargingArmor.schedule(250, "zombieSlowDownCheck", %obj, %conn);
%obj.zombieChargerStart = %obj.getPosition();
%obj.zombieChargerStartTime = $sim::time;

return true;
}
}
}
}

return false;
}
If anyone wants to fix this code, I'll repackage it and upload it.

There is no trace of "AIConnection" in Gamemode_Zombie.

Edit:
Look here: https://forum.blockland.us/index.php?topic=301211.0
« Last Edit: August 11, 2016, 12:48:22 AM by --LegoPepper-- »