Author Topic: Headcrab mod needs YOUR help  (Read 1477 times)

I've decided to remake my Headcrab mod for v10, but i need help, i want to make it so if someone already typed /headcrab, and re-types it, it'll say "NAME" is no longer a headcrab zombie.", here's the script

Code: [Select]
datablock ShapeBaseImageData(HeadcrabImage)
{
shapeFile = "Add-Ons/Script_Headcrab/Headcrab.dts";
emap = true;
mountPoint = $HeadSlot;
offset = "0 0 0.1";
eyeOffset = "0 0 0.1";
rotation = eulerToMatrix("0 0 0");
scale = "1 1 1";
doColorShift = false;
colorShiftColor = "1.000 1.000 1.000 1.000";
};

function serverCmdHeadcrab(%client)
{

bottomPrintAll(%client.name SPC "has become a headcrab zombie!",3,1);
//other stuff

%player = %client.player;

if(isObject(%player))
{
if(%player.getMountedImage(2) $= nametoID(HeadcrabImage))
{
%player.unmountImage(2);
%client.applyBodyParts();
%client.applyBodyColors();
}
else
{
%player.unmountImage(2);
%player.mountImage(HeadcrabImage,2);
bottomPrintAll(%client.name SPC "is no longer a headcrab zombie.",3,1);

for(%i = 0;$hat[%i] !$= "";%i++)
{
%player.hideNode($hat[%i]);
%player.hideNode($accent[%i]);
%player.hideNode(headskin);
}
}
}
}

I'll fix the offset myself since i at least know how to do that right

Edit: I've made it so that "NAME is no longer a headcrab zombie." message appear, but it happens when i first put on the headcrab
« Last Edit: December 15, 2008, 03:53:26 PM by Masterlegodude »

Code: [Select]
%player.hideNode(headskin);
will hide the player's head.

Code: [Select]
function serverCmdHeadcrab(%client)
{
if (%client.headcrab == false)
  {
  %client.headcrab = true;
  your script here
  }
else
  {
  %client.headcrab = false;
  your other script here
  }
}

Alright, new script added to the first post, it works, but my head doesn't come back, wha? o.o

Make a face-hugger mod too!


Alright, new script added to the first post, it works, but my head doesn't come back, wha? o.o
Code: [Select]
%player.hideNode(headskin);
will hide the player's head.

Okay, so where would i put the %player.unhideNode(headskin); thing? I can't seem to find where it could go :/

What is that?
A head-crab like baby alien from aliens, only thing you'd need to do was too change the model

Code: [Select]
datablock ShapeBaseImageData(HeadcrabImage)
{
shapeFile = "Add-Ons/Script_Headcrab/Headcrab.dts";
emap = true;
mountPoint = $HeadSlot;
offset = "0 0 0.1";
eyeOffset = "0 0 0.1";
rotation = eulerToMatrix("0 0 0");
scale = "1 1 1";
doColorShift = false;
colorShiftColor = "1.000 1.000 1.000 1.000";
};

function serverCmdHeadcrab(%client)
{

bottomPrintAll(%client.name SPC "has become a headcrab zombie!",3,1);
//other stuff

%player = %client.player;

if(isObject(%player))
{
if(%player.getMountedImage(2) $= nametoID(HeadcrabImage))
{
%player.unmountImage(2);
%client.applyBodyParts();
%client.applyBodyColors();
                        %client.unHideNode(headskin);
}
else
{
%player.unmountImage(2);
%player.mountImage(HeadcrabImage,2);
bottomPrintAll(%client.name SPC "is no longer a headcrab zombie.",3,1);

for(%i = 0;$hat[%i] !$= "";%i++)
{
%player.hideNode($hat[%i]);
%player.hideNode($accent[%i]);
%player.hideNode(headskin);
}
}
}
}

Are these zombies like the zombie mod or zombies like what you become when you put one on your head, like in H-L?

zombies like what you become when you put one on your head, like in H-L
too lazy to type...

Code: [Select]
%client.unHideNode(headskin);should be
Code: [Select]
%player.unHideNode(headskin);
as you have it as %player.hideNode(headskin) further down.

Alright, i'll do that next time i get on the Vista PC

I couldn't go on a little earlier today cause i had a headache >_<