Author Topic: Custom Zombie Not Walking  (Read 932 times)

It doesn't follow you.
Code: [Select]
datablock PlayerData(ParasiteZombie : PlayerStandardArmor)
{
cameraVerticalOffset = 3;
shapefile = "./Parasite.dts";
canJet = 0;
mass = 120;
   drag = 0.02;
   density = 0.6;
   runSurfaceAngle = 1;
   jumpSurfaceAngle = 0;
runforce = 100 * 90;
maxForwardSpeed = 8;
maxBackwardSpeed = 8;
maxSideSpeed = 8;
showEnergyBar = false;

   minJumpSpeed = 0;
   maxJumpSpeed = 200;

rideable = false;
canRide = false;
paintable = true;

   boundingBox = vectorScale("3 3 2", 4); //"2.5 2.5 2.4";
   crouchBoundingBox = vectorScale("3 3 2", 4); //"2.5 2.5 2.4";
   proneBoundingBox = vectorScale("3 3 2", 4); //"2.5 2.5 2.4";

   lookUpLimit = 0.65;
lookDownLimit = 0.45;
   upMaxSpeed = 1;
   upResistSpeed = 1;
   upResistFactor = 1;

attackpower = 40;
maxDamage = 500;
//jumpForce = 40 * 90; //8.3 * 90;
jumpForce = 100 * 90; //8.3 * 90;
jumpsound = "";
BrickDestroyMaxVolume = 250;
BrickMaxJumpHeight = 20;
uiName = "Parasite";
rideable = true;
canRide = false;
BrickKillRadius = 2;
skinColor = "0 0 0 1";
FollowAnim = "ArmReadyright";
randomwalk = 1;
SearchRadius = 30;
DoNotZombify = 1;
aimatplayer = 1;
};
Used shark as base

What's the rest of the code? Did you shoot it? Do other zombies work?

What's the rest of the code? Did you shoot it? Do other zombies work?
Others work. This takes damage but doesn't turn to face you nor does it follow you.
Code: [Select]
datablock TSShapeConstructor(ParasiteDts)
{
baseShape  = "./parasite.dts";
sequence0  = "./root.dsq root";

sequence1  = "./walk.dsq run";
sequence2  = "./walk.dsq walk";
sequence3  = "./walk.dsq back";
sequence4  = "./walk.dsq side";

sequence5  = "./walk.dsq crouch";
sequence6  = "./walk.dsq crouchRun";
sequence7  = "./walk.dsq crouchBack";
sequence8  = "./walk.dsq crouchSide";

sequence9  = "./root.dsq look";
sequence10 = "./root.dsq headside";
sequence11 = "./root.dsq headUp";

sequence12 = "./jump.dsq jump";
sequence13 = "./jump.dsq standjump";
sequence14 = "./Jump.dsq fall";
sequence15 = "./Land.dsq land";

sequence16 = "./Attack.dsq armAttack";
sequence17 = "./root.dsq armReadyLeft";
sequence18 = "./root.dsq armReadyRight";
sequence19 = "./root.dsq armReadyBoth";
sequence20 = "./root.dsq spearready"; 
sequence21 = "./root.dsq spearThrow";

sequence22 = "./root.dsq talk"; 

sequence23 = "./death.dsq death1";

sequence24 = "./root.dsq shiftUp";
sequence25 = "./root.dsq shiftDown";
sequence26 = "./root.dsq shiftAway";
sequence27 = "./root.dsq shiftTo";
sequence28 = "./root.dsq shiftLeft";
sequence29 = "./root.dsq shiftRight";
sequence30 = "./root.dsq rotCW";
sequence31 = "./root.dsq rotCCW";

sequence32 = "./root.dsq undo";
sequence33 = "./root.dsq plant";

sequence34 = "./root.dsq sit";

sequence35 = "./root.dsq wrench";

   sequence36 = "./attack.dsq activate";
   sequence37 = "./attack.dsq activate2";

   sequence38 = "./root.dsq leftrecoil";
};   



 datablock PlayerData(ParasiteZombie : PlayerStandardArmor)
{
cameraVerticalOffset = 3;
shapefile = "./Parasite.dts";
canJet = 0;
mass = 120;
   drag = 0.02;
   density = 0.6;
   runSurfaceAngle = 1;
   jumpSurfaceAngle = 0;
runforce = 100 * 90;
maxForwardSpeed = 8;
maxBackwardSpeed = 8;
maxSideSpeed = 8;
showEnergyBar = false;

   minJumpSpeed = 0;
   maxJumpSpeed = 200;

rideable = false;
canRide = false;
paintable = true;

   boundingBox = vectorScale("3 3 2", 4); //"2.5 2.5 2.4";
   crouchBoundingBox = vectorScale("3 3 2", 4); //"2.5 2.5 2.4";
   proneBoundingBox = vectorScale("3 3 2", 4); //"2.5 2.5 2.4";

   lookUpLimit = 0.65;
lookDownLimit = 0.45;
   upMaxSpeed = 1;
   upResistSpeed = 1;
   upResistFactor = 1;

attackpower = 40;
maxDamage = 500;
//jumpForce = 40 * 90; //8.3 * 90;
jumpForce = 100 * 90; //8.3 * 90;
jumpsound = "";
BrickDestroyMaxVolume = 250;
BrickMaxJumpHeight = 20;
uiName = "Parasite";
rideable = true;
canRide = false;
BrickKillRadius = 2;
skinColor = "0 0 0 1";
FollowAnim = "ArmReadyright";
randomwalk = 1;
SearchRadius = 30;
DoNotZombify = 1;
aimatplayer = 1;
};
function ParasiteZombie::ondisabled(%this,%obj)
{
parent::ondisabled(%this,%obj);
ZombieDefault::ondisabled(%this,%obj);
}
function ParasiteZombie::onCollision(%this, %obj, %col, %fade, %pos, %norm)
{
parent::oncollision(%this, %obj, %col, %fade, %pos, %norm);
ZombieDefault::onCollision(%this, %obj, %col, %fade, %pos, %norm);
}
function ParasiteZombie::onMount(%a,%player,%vehicle,%d,%e,%f)
{
ZombieDefault::onMount(%a,%player,%vehicle,%d,%e,%f);
parent::onMount(%a,%player,%vehicle,%d,%e,%f);
}
function ParasiteZombie::onUnMount(%a,%player,%vehicle,%d,%e,%f)
{
ZombieDefault::onUnMount(%a,%player,%vehicle,%d,%e,%f);
parent::onUnMount(%a,%player,%vehicle,%d,%e,%f);
}

I don't know how you're spawning it since rideable needs to = true; for it to appear in the vehicle spawn gui.

change    rideable = false; to    rideable = true; spawn it like the other zombies, see if it works.

I don't know how you're spawning it since rideable needs to = true; for it to appear in the vehicle spawn gui.

change    rideable = false; to    rideable = true; spawn it like the other zombies, see if it works.
It is true? Look again?

He says change it to true.
Though I wonder as much he does to how you're spawning it with rideable being false.

Wait a second here, apparently in the Ai_shark datablock I put canride and rideable twice, well that was dumb of me.

I don't know why it's not working now.

Edit: wait now I think I know what's wrong, do you have ParasiteZombie::onadd in your script?

If not that's why it's not acting like a zombie, copy it from ai shark, or any of the other zombies and rename it appropriately.
« Last Edit: September 11, 2009, 03:51:10 PM by Rotondo »

works now, but is now flickering when gets close. I think it is the eye node.

Fixed mosto f the twitch thing.
Edit: wait now I think I know what's wrong, do you have ParasiteZombie::onadd in your script?
Code: [Select]
function ParasiteZombie::onAdd(%this,%obj)
{
parent::onAdd(%this,%obj);
ZombieDefault::onAdd(%this,%obj);

%obj.name = "Parasite";
//national socialistfy(%obj);
//schedule(20,0,ghostifybot,%obj);
//%obj.playthread(1,armreadyright);
//%obj.setarmthread(crouch);

//%obj.schedule(20,setfacename,smileyblonde);
//%obj.schedule(20,setdecalname,"mod-suit");
}
It gives console spam about the hand node due to the Zombiedefault thing.

if DoNotZombify is enabled in the datablock it should avoid applying an appearance from the apfinder to the zombie player.

Edit: wait you also need NoBloodyHands = 1; in the datablock to prevent the hands from getting colored red when the zombie attacks a player, which should be what's causing your console spam.
« Last Edit: September 11, 2009, 10:22:50 PM by Rotondo »