Masked Barney

Tutorial collection, comprehensive listings on main site.

Masked Barney

Postby Tutorial on Wed Jul 15, 2009 8:53 am

category
General Half-Life 2/Entities

description
Getting Barney to wear his combine facemask.

keywords
barney, combine, mask, facemask, helmet, template.

This tutorial is for anyone who wants Barney to wear his helmet but couldn’t figure out how. This is good for when you want a Metrocop to have more animation options but don’t want to or can’t decompile/compile models.

Entities you’ll need:

  • Npc_barney
  • Point_template
  • Logic_relay
  • 2-Dynamic_props
  • Trigger
  • Logic_auto

Image

Place npc_barney in your map with default settings and name him barney. Now place two prop_dynamic's near barney. In the properties for one prop_dynamic click World Model and select the faceplate, then name it helmetfaceplate. Now in the properties for the other prop_dynamic click World Model and select the helmet, then name it helmetBack. That’s it for the models you will need.

Place a logic_relay in the map and name it logic_barney_init. In the Outputs tab you will add four triggers as follows:

Code: Select all
OnTrigger – helmetBack – SetParent – barney - 0.00
OnTrigger - helmetfaceplate - SetParent - barney - 0.00
OnTrigger – helmetfaceplate – SetParentAttachment - helmet_attachment - 0.10
OnTrigger - helmetBack - SetParentAttachment - helmet_attachment - 0.10


Image

Now place a point_template in the map and name it barney_template. In the properties under Class Info set Template 1 to barney. In the Outputs tab you will add:

Code: Select all
OnEntitySpawned - logic_barney_init – Trigger - 0.00


Image

Place a logic_auto in the map and in the Outputs tab add:

Code: Select all
OnMapSpawn - logic_barney_init – Trigger - 0.00


Image

Almost done, select the block tool with a trigger texture and place it in the map, I made mine around the feet of the info_player_start. Click toEntity and set it to trigger_once. In the Outputs tab add:

Code: Select all
OnTrigger - barney_template – ForceSpawn - 0.00


Image

And there you have it, Barney pops up with his combine helmet on and no one has to look at his ugly face. I hope this helps anyone out there who wanted to know this. Use it in good health.

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

Re: Masked Barney

Postby chargers5583 on Thu Jul 16, 2009 6:09 am

His face isn't THAT ugly is it?
User avatar
chargers5583
Member
Member
 
Joined: Thu Mar 12, 2009 3:22 am
Location: Home of the CHARGERS

Re: Masked Barney

Postby Horyo on Fri Jul 17, 2009 2:53 am

Like a seadonkey!
Horyo
Dumpling
Dumpling
 
Joined: Tue Jul 07, 2009 3:12 pm

Re: Masked Barney

Postby St.Penguin on Tue Aug 11, 2009 3:27 pm

Awesome, good to know.
On a related note, any tips on how to achieve the removing of the mask, like in first map of hl2? Would I be wrong in assuming that you'd need another faceplate entity, which would be attached the instant that the other one is killed, in conjunction with scripting the appropriate animation (I'm assuming that the removing of the mask is one of Barney's animations, not actually stating it) to occur at that moment? Any help on that would be nice :)
St.Penguin
Member
Member
 
Joined: Wed Jul 01, 2009 12:04 am

Re: Masked Barney

Postby Horyo on Sat Aug 15, 2009 2:32 pm

If you load up the first level in Hammer and go to that part of the map, you might be able to decipher it. There are 2 faceplates where you first meet Barney in the hallway. In the interogation room the scripted_sequence where he takes off the mask there is no kill command. The faceplates "TurnOn" and "TurnOff" because "Kill" would remove them from the map and he needs to be able to put it back on. I haven't tried to recreate that scene yet and I'm not sure I ever will. But if I do I will post it.
Horyo
Dumpling
Dumpling
 
Joined: Tue Jul 07, 2009 3:12 pm

Return to Tutorials

Who is online

Users browsing this forum: No registered users