crates

crates

Re: crates Posted by hutchy212 on Fri May 19th 2006 at 7:03pm
hutchy212
9 posts
Posted 2006-05-19 7:03pm
9 posts 1 snarkmarks Registered: May 19th 2006
Hey,
Ive been working on locked doors and keycards, and i really want to put a keycard i have made inside a crate. I am using a item_item_crate not a prop. Any ideas how i can do this. Im very new to mapping in HL2 so this could very well be a stupid question but i have search through a few forums to sort this out myself but no luck.
Re: crates Posted by Crono on Fri May 19th 2006 at 8:14pm
Crono
6628 posts
Posted 2006-05-19 8:14pm
Crono
super admin
6628 posts 700 snarkmarks Registered: Dec 19th 2003 Location: Oregon, USA
I imagine you put an output on the crate (I believe those are the ones that smash to pieces right?) in the output it'd be something like "OnBreak" Spawn keycard. I'm not sure how you spawn custom items though. Perhaps it'd need to be more complex. If it doesn't work with a custom item, see if you can get that technique to work with ammo or something.

In the most complex of situations, you might just want to make a keycard object and add it to the weapon class or something. (I'm sure there's a way you can do it)
Blame it on Microsoft, God does.
Re: crates Posted by hutchy212 on Fri May 19th 2006 at 10:13pm
hutchy212
9 posts
Posted 2006-05-19 10:13pm
9 posts 1 snarkmarks Registered: May 19th 2006
Thats what i thought, i created an output but i dont understand how to get how to spawn the keycard.
Re: crates Posted by Crono on Sat May 20th 2006 at 3:13am
Crono
6628 posts
Posted 2006-05-20 3:13am
Crono
super admin
6628 posts 700 snarkmarks Registered: Dec 19th 2003 Location: Oregon, USA
You say "Spawn" then spawn the item. ... how you make the item in hammer is up to you. It could be a physics object tied with a trigger for "on touch" execute some event. I imagine you need another entity managing all the doors. To map if you have the keycard or not. You would set that value in the entity to "true" for whatever keycard and the door checks that label. The bare specifics I'm unsure of, but I believe you'd use a logic entity.

You might want to do some research on that, I don't really have time to work with it and give you a definate answer, however. I'm sure there's some tutorials floating around that have something similar that you can modify.

I should note my entity names are not exact.

Here's some tutorials:

Math Trigger
Respawning Props
Logic Case

Look at those to get yourself started. You should be able to do it with that information.
Blame it on Microsoft, God does.
Re: crates Posted by hutchy212 on Sat May 20th 2006 at 3:49pm
hutchy212
9 posts
Posted 2006-05-20 3:49pm
9 posts 1 snarkmarks Registered: May 19th 2006
Cheers for you help,

Cant figure it out so dont think im going to bother, ive done all the keycards and doors and stuff. I just fancied hidding some of the cards in crates.

Got bigger problems to sort out now.