Author Topic: Headcrab mod: Any model changes needed?  (Read 5258 times)


Sorry, Titaniam beat you to it. He's got one of pure win at his server :D
Only problems are, it's hl2 copy, and it can cause lag :/

Okay, so i've backed up the files this time, i want to make it so it's an item, but also i slash command, but it ain't showing up in the add-ons list, now, i knew this wouldn't work somehow, so i didn't expect this to work, all i did was copy and paste a lot of stuff

Code: [Select]
//Headcrab.cs

//////////
// item //
//////////
datablock ItemData(HeadcrabItem)
{
category = "Weapon";  // Mission editor category
className = "Weapon"; // For inventory system

// Basic Item Properties
shapeFile = "Add-Ons/Script_Headcrab/Headcrab.dts";
rotate = false;
mass = 1;
density = 0.2;
elasticity = 0.2;
friction = 0.6;
emap = true;

//gui stuff
uiName = "Headcrab";
iconName = "Add-Ons/Script_Headcrab/icon_Headcrab";
doColorShift = false;
colorShiftColor = "0.25 0.25 0.25 1.000";

// Dynamic properties defined by the scripts
image = HeadcrabImage;
canDrop = true;
};

////////////////
//weapon image//
////////////////
datablock ShapeBaseImageData(HeadcrabImage)
{
   // Basic Item properties
   shapeFile = "Add-Ons/Script_Headcrab/Headcrab.dts";
   emap = true;

   // Specify mount point & offset for 3rd person, and eye offset
   // for first person rendering.
   mountPoint = 0;
   offset = "0 0 -0.39";
   rotation = eulerToMatrix("-90 90 0");
   eyeOffset = "0 0 0.1";
   eyeRotation = eulerToMatrix("90 -90 0");

   // When firing from a point offset from the eye, muzzle correction
   // will adjust the muzzle vector to point to the eye LOS point.
   // Since this weapon doesn't actually fire from the muzzle point,
   // we need to turn this off. 
   correctMuzzleVector = true;

   // Add the WeaponImage namespace as a parent, WeaponImage namespace
   // provides some hooks into the inventory system.
   className = "WeaponImage";

   // Projectile && Ammo.
   item = HeadcrabItem;

   //melee particles shoot from eye node for consistancy
   melee = false;
   //raise your arm up or not
   armReady = true;

   doColorShift = false;
   colorShiftColor = HeadcrabItem.colorShiftColor;//"0.400 0.196 0 1.000";

   //casing = " ";

   // Images have a state system which controls how the animations
   // are run, which sounds are played, script callbacks, etc. This
   // state system is downloaded to the client so that clients can
   // predict state changes and animate accordingly.  The following
   // system supports basic ready->fire->reload transitions as
   // well as a no-ammo->dryfire idle state.

   // Initial start up state
stateName[0]                     = "Activate";
stateTimeoutValue[0]             = 0.5;
stateTransitionOnTimeout[0]       = "Ready";

stateName[1]                     = "Ready";
stateTransitionOnTriggerDown[1]  = "Fire";
stateAllowImageChange[1]         = true;

stateName[2]                    = "Fire";
stateTransitionOnTriggerUp[2] = "Ready";
stateScript[2]                  = "onFire";
};

function HeadcrabImage::onFire(%this,%obj,%slot)
{

bottomPrintAll(%client.name SPC "\c2is no longer 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();
%player.unHideNode(headskin);
}
else
{
%player.unmountImage(2);
%player.mountImage(HeadcrabImage,2);
bottomPrintAll(%client.name SPC "has become a headcrab zombie!",3,1);

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

function serverCmdHeadcrab(%client)
{

bottomPrintAll(%client.name SPC "\c2is no longer 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();
%player.unHideNode(headskin);
}
else
{
%player.unmountImage(2);
%player.mountImage(HeadcrabImage,2);
bottomPrintAll(%client.name SPC "has become a headcrab zombie!",3,1);

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

i think The Titanium has the best "headcrabs" in BL he has "flat[kinda flatened]  normal[more tall/large whatever] and poison[greenish one on head and 2 on back] and maybe fast idk

Although I mentioned it before to and there's a lot of hypocritical statement in this post, this is MLD & Azereth's headcrab zombie mod not Titanium's :P

Okay, so i've backed up the files this time, i want to make it so it's an item, but also i slash command, but it ain't showing up in the add-ons list, now, i knew this wouldn't work somehow, so i didn't expect this to work, all i did was copy and paste a lot of stuff

Code: [Select]
//Headcrab.cs

//////////
// item //
//////////
datablock ItemData(HeadcrabItem)
{
category = "Weapon";  // Mission editor category
className = "Weapon"; // For inventory system

// Basic Item Properties
shapeFile = "Add-Ons/Script_Headcrab/Headcrab.dts";
rotate = false;
mass = 1;
density = 0.2;
elasticity = 0.2;
friction = 0.6;
emap = true;

//gui stuff
uiName = "Headcrab";
iconName = "Add-Ons/Script_Headcrab/icon_Headcrab";
doColorShift = false;
colorShiftColor = "0.25 0.25 0.25 1.000";

// Dynamic properties defined by the scripts
image = HeadcrabImage;
canDrop = true;
};

////////////////
//weapon image//
////////////////
datablock ShapeBaseImageData(HeadcrabImage)
{
   // Basic Item properties
   shapeFile = "Add-Ons/Script_Headcrab/Headcrab.dts";
   emap = true;

   // Specify mount point & offset for 3rd person, and eye offset
   // for first person rendering.
   mountPoint = 0;
   offset = "0 0 -0.39";
   rotation = eulerToMatrix("-90 90 0");
   eyeOffset = "0 0 0.1";
   eyeRotation = eulerToMatrix("90 -90 0");

   // When firing from a point offset from the eye, muzzle correction
   // will adjust the muzzle vector to point to the eye LOS point.
   // Since this weapon doesn't actually fire from the muzzle point,
   // we need to turn this off. 
   correctMuzzleVector = true;

   // Add the WeaponImage namespace as a parent, WeaponImage namespace
   // provides some hooks into the inventory system.
   className = "WeaponImage";

   // Projectile && Ammo.
   item = HeadcrabItem;

   //melee particles shoot from eye node for consistancy
   melee = false;
   //raise your arm up or not
   armReady = true;

   doColorShift = false;
   colorShiftColor = HeadcrabItem.colorShiftColor;//"0.400 0.196 0 1.000";

   //casing = " ";

   // Images have a state system which controls how the animations
   // are run, which sounds are played, script callbacks, etc. This
   // state system is downloaded to the client so that clients can
   // predict state changes and animate accordingly.  The following
   // system supports basic ready->fire->reload transitions as
   // well as a no-ammo->dryfire idle state.

   // Initial start up state
stateName[0]                     = "Activate";
stateTimeoutValue[0]             = 0.5;
stateTransitionOnTimeout[0]       = "Ready";

stateName[1]                     = "Ready";
stateTransitionOnTriggerDown[1]  = "Fire";
stateAllowImageChange[1]         = true;

stateName[2]                    = "Fire";
stateTransitionOnTriggerUp[2] = "Ready";
stateScript[2]                  = "onFire";
};

function HeadcrabImage::onFire(%this,%obj,%slot)
{

bottomPrintAll(%client.name SPC "\c2is no longer 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();
%player.unHideNode(headskin);
}
else
{
%player.unmountImage(2);
%player.mountImage(HeadcrabImage,2);
bottomPrintAll(%client.name SPC "has become a headcrab zombie!",3,1);

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

function serverCmdHeadcrab(%client)
{

bottomPrintAll(%client.name SPC "\c2is no longer 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();
%player.unHideNode(headskin);
}
else
{
%player.unmountImage(2);
%player.mountImage(HeadcrabImage,2);
bottomPrintAll(%client.name SPC "has become a headcrab zombie!",3,1);

for(%i = 0;$hat[%i] !$= "";%i++)
{
%player.hideNode($hat[%i]);
%player.hideNode($accent[%i]);
%player.hideNode(headskin);
}
}
}
}
Pretty good scripting .I dont kno why it disappeared. I am usually good at finding files. Mabey you need to get a more updated driver. It may have been lost in a crash. Could be that you may have lost a file while you were scripting.

<Thinks> Try looking in all of your 7. files, Zip files, program files, un-arcxhived files, extracts and in your graph list for Torqu or Blockland... [.::ps::. tare you going to make a new vehicle? like a hl2 air-boat? Or an npc mod. Kinda like bots but like with a personality and can shoot stuff like a Portal Sentury Bot (turret)]

The one where its on the head, well, it looks like he was decapitated, THEN the headcrab jumped on him.

is it possible to animate it?

is it possible to animate it?
If so it'd be cool to remove the legs and leave the feet (like the average Blockhead)

is it possible to animate it?
And do what?

If so it'd be cool to remove the legs and leave the feet (like the average Blockhead)
Wat?


suggest trying to make it shaped like this http://www.gamasutra.com/features/20070508/headcrab.jpg
not like a alien ship.

No model change. But what is needed is so that you can see a bit of the minifigs head. Otherwise it kind of just looks weird IMO.

No model change. But what is needed is so that you can see a bit of the minifigs head. Otherwise it kind of just looks weird IMO.
yeah a blockhead head is kinda big for a head crab lol

can someone pm me about what the real HL headcrab zombie thing is?