Head Crab Canister

Tutorial collection, comprehensive listings on main site.

Head Crab Canister

Postby Tutorial on Tue Mar 08, 2005 12:34 am

category
General Half-Life 2/Entities

description
These plagued the player throughout HL2, learn how to do the same in your maps.

keywords
head, crab, env_headcrabcanister, canister.

So. On to env_headcrabcanisters, home to all manner of lovely gribbly things. Well. Home to headcrabs, anyway.

There are three main ways to use an env_headcrabcanister.

Method 1; a stationary, 'already landed' env_headcrabcanister.
Method 2; an 'targetted' env_headcrabcanister.
Method 3; a 'non-targetted' env_headcrabcanister.

All three of these methods require a trigger_once, or the like, if you wish to actually spawn headcrabs or have the env_headcrabcanister actually do anything at all.

Method 1; Stationary.

Place your env_headcrabcanister where you would like it to be in the game. I'd suggest putting it in a crater, or at the very least putting scorch marks on the ground where it has supposedly impacted.
Rotate it as you require, remembering that the headcrabs need space to come out if you want them to spawn.
Give the env_headcrabcanister a name, then set the headcrab type, and the number of headcrabs you wish to spawn. You can, if you wish, adjust the amount of time the env_headcrabcanister emits smoke for, too.
Now, we go to the flags. This is where the main differences between the methods arise.

We want the env_headcrabcanister to have already launched. What we now need to decide is what we want the env_headcrabcanister to do; whether it should spawn some headcrabs, or be a piece of the scenery. I'll assume, for the sake of this tutorial, that we want to spawn some headcrabs.

Check Start Impacted. This will make the env_headcrabcanister start where you place it in Hammer.
Check Wait for input to open and Wait for input to spawn headcrabs. Ordinarily, when an env_headcrabcanister impacts the ground, it'll do these things itself. We want it to be triggered by the player walking near it, however.

Create a trigger_once around the env_headcrabcanister. Two outputs are required for the OnTrigger event; OpenCanister and SpawnHeadcrabs. Make sure you set the delay on SpawnHeadcrabs to at least 0.75, otherwise the headcrabs will be unable to spawn.

Compile and run. Move into the trigger, and wait for the env_headcrabcanister to open...

Method 2; Targetted.

Set the env_headcrabcanister up as before; place it where you want it to end up in the level, and set the number of headcrabs it creates and such. I'd suggest leaving the speed and flight time unchanged; the default values look good enough to me.

Instead of checking Start Impacted, however, use Land at initial position. For the sake of this tutorial, leave everything else unchecked.

Use the trigger_once to target the env_headcrabcanister's input of FireCanister.

Compile, and run. Move into the trigger, and wait for the Flight time...
...I'd suggest not standing where it's likely to hit, incidentally.

The env_headcrabcanister will take Flight time seconds, moving at the Flight speed, to impact where you have already put it.

The flight path is generated by checking the angle at which the env_headcrabcanister is meant to land at, the Flight time, and the Flight speed. It will be drawn in the 3d skybox, if one exists.

It will ignore scenery, and fly directly through it as if it is not there.

Method 3; Non-Targetted.

This final method is best used for firing env_headcrabcanisters inside the skybox, mainly as eye candy than to actually interact with the world.

The env_headcrabcanister can be placed in the skybox. It can then be fired by a trigger, after being aimed and having its Flight time and Flight speed adjusted. It will fly through the air, and impact wherever the values take it.

I'd suggest the best way to use this method is to fire the env_headcrabcanister over the head of the player (as in, still inside the 3d skybox), with the flag Remove on impact checked. In this way, you can simulate multiple env_headcrabcanister launches without the whole mess of headcrabs at the end.

Trust me, it looks quite scary to see fifteen env_headcrabcanister fly over your head.

If the env_headcrabcanisters hit the skybox containing the player at any point, they will continue on into it. This can have the side effect of moving the env_headcrabcanister somewhat, and generating a strange vapour trail. Hence, I advise using Method 2 to actually introduce an env_headcrabcanister into the world.

This method can also be used to fire env_headcrabcanisters in a random pattern inside of the skybox, of course, but for best results in a single player game I'd again suggest using Method 2.

Have fun.

Noctu
- Don't send PM's to this user -
Tutorial
Not A Real User
 
Joined: Sun Mar 06, 2005 11:00 pm

Postby Guessmyname on Sun Mar 27, 2005 10:39 pm

Do you put the crab canister in the 3D skybox with the third method?
User avatar
Guessmyname
1337 p0st3r
1337 p0st3r
 
Joined: Sun Mar 27, 2005 10:38 pm

Postby Serever on Tue Apr 12, 2005 12:10 am

The env_headcrabcanister can be placed in the skybox.
"Hey Scott. It's Dougal. Can I have my hair from the 1980's back?"
User avatar
Serever
Senior Member
Senior Member
 
Joined: Tue Nov 23, 2004 9:23 pm
Location: NSW, Australia

Postby Ripper_hugme on Tue Apr 12, 2005 9:03 am

is there a prop for the canister or what , for us multiplayer mapper people
User avatar
Ripper_hugme
Veteran
Veteran
 
Joined: Tue Apr 12, 2005 9:01 am
Location: Australia: Now a Major Motion Picture!

Postby Serever on Tue Apr 12, 2005 9:06 am

yep. its in props_combine. use a prop_dynamic
"Hey Scott. It's Dougal. Can I have my hair from the 1980's back?"
User avatar
Serever
Senior Member
Senior Member
 
Joined: Tue Nov 23, 2004 9:23 pm
Location: NSW, Australia

Postby Google [Bot] on Thu Apr 14, 2005 10:21 pm

Nice tutorial. This should a help a lot. . . when i actually GET there . . . .
Google [Bot]
 

Postby crazi nurgling149 on Wed Aug 24, 2005 7:15 am

Nice tutorials, this is my most favourite one yet. AWESOME!! :D
"Wanna lose weight? Here's a hint: PUT DOWN THE FORK!!!"

"A stranger is just a friend waiting to happen"
"Yeah, either that or rape in a dark alley waiting to happen"

A pirate I was meant to be, trim the sails and roam the sea!

I am the milkman, my milk is delicious.

In Canada, leaf maples you!
User avatar
crazi nurgling149
Just Joined
Just Joined
 
Joined: Tue Aug 23, 2005 6:36 am
Location: Ipswich, QLD,Australia

he...

Postby Opheliar on Wed Nov 16, 2005 9:30 pm

First... whats a Trigger_once? a texture? an entity? WHAT?
Second... how do i link it to the canister? HOW?
This tutorial is not clear enough...
Well, if you can, explain me.
thanks
Opheliar
Dumpling
Dumpling
 
Joined: Wed Nov 16, 2005 9:27 pm

Postby NightWolf on Wed Nov 16, 2005 10:12 pm

Woah I think you need to know the basics first before you do this because you dont even know what and entity and a texture is. :shock:

Try this, it will help some, http://developer.valvesoftware.com/wiki ... to_Editing

And also http://developer.valvesoftware.com/wiki/Getting_Started
That is the first tutorial I did for Hammer. :-)
Image
User avatar
NightWolf
May Contain Skills
May Contain Skills
 
Joined: Tue Jul 12, 2005 11:55 pm
Location: The 4th Dimension...

Postby Ark_Gamer on Fri Dec 23, 2005 1:56 am

How do you get it to arc through the air like an artillery shell? For me, it flys in a strait line and stops. I can't rotate it or anything to make it look realistic.
A man walks into a bar with a giraffe. They both get pissed, and the giraffe falls over. The man goes to leave and the bartender says "Aye, you can't leave that lyin' there!" The man says, "It's okay, it's not a lion. It's a giraffe."
Ark_Gamer
Regular
Regular
 
Joined: Thu Dec 22, 2005 11:33 pm
Location: Bloomington, IN

Postby Sauce on Thu Jan 19, 2006 10:26 am

Did you set the speed and the time until impact too high?
Image
Blink wrote:Do you watch porn and decide you don't need to have sex because you've seen the ending? :-D

zombie@computer wrote:what retarded countries measure in stones anyway?
or feet? or inches? Your dick is a lot longer in cms
User avatar
Sauce
Senior Member
Senior Member
 
Joined: Sat Nov 26, 2005 4:36 am
Location: Australia

Postby Sauce on Thu Jan 19, 2006 10:58 am

Oh, and BTW, this has been the most easy and straightforward tut ever! Thanks, worked first time, and I didn't even have to read it a second time!
Image
Blink wrote:Do you watch porn and decide you don't need to have sex because you've seen the ending? :-D

zombie@computer wrote:what retarded countries measure in stones anyway?
or feet? or inches? Your dick is a lot longer in cms
User avatar
Sauce
Senior Member
Senior Member
 
Joined: Sat Nov 26, 2005 4:36 am
Location: Australia

Postby Mas on Sat Feb 04, 2006 1:32 pm

hay can u put pics off it cos its hard buy thx eney way :)
Mas
Dumpling
Dumpling
 
Joined: Mon Jan 23, 2006 10:30 pm

Mas

Postby Mas on Sat Feb 04, 2006 2:05 pm

never mind i done it, its works yes :-D
Mas
Dumpling
Dumpling
 
Joined: Mon Jan 23, 2006 10:30 pm

Postby Noctu on Sun Jul 16, 2006 4:18 pm

Christ, I forgot that I'd written these.

Random reply to my own old thread ho!
Noctu
Member
Member
 
Joined: Fri Dec 03, 2004 7:20 pm
Next

Return to Tutorials

Who is online

Users browsing this forum: No registered users