Please or Register to create posts and topics.

How to set actors to play voice lines?

Hello. I was wondering if someone could show me a step-by-step process on how to set up actors (eg: GLaDOS, wheatly (@sphere) etc.) and how to get them to 'speak' voice lines.

I mainly need only wheatly for now, and I know that requires an '@sphere' actor, only I have no idea how to set this up. If someone could show me how to activate these in Hammer, and where to choose voice lines, that would be fantastic. Thanks!

First, make sure you have the instances/global_ents.vmf instance in your map. It has the actors for GLaDOS and the Announcer all setup for you, plus a ton of other useful entities. For Wheatley, use either an npc_personality_core (if he's a regular core), or an npc_wheatley_boss (when plugged into the central AI). If you aren't actually meeting him (he's just on the monitors), place the instances/monitors/wheatley_studio.vmf instance somewhere. It has Wheatley in a black room setup so he appears on the screen (the instance for that is in the same folder). (Cave Johnson uses npc_bullseyes with a particular name, put them next to a loudspeaker. The console prints out the required name if you don't have it in the map when he tries to speak.)

To play lines, use a logic_choreographed_scene. This automatically makes Wheatley play animations at the right time so he gestures properly, as well as subtitles and makes PoTaTOS's light blink (if appropriate). You can't preview the line inside hammer, so go here, find the line you want and check the "download" URL for the filename. It's the same as the ingame VCD, plus "wheatley_" or whatever at the beginning. To trigger a scene, give it the Start input. The scenes have OnCompleted and OnStart inputs, so you can chain together multiple for a longer monologue. Note that if a character is already speaking, the game will automatically queue up the lines and wait for them to finish. (You can change that in the entity properties, and it's individual for each character- GLaDOS will happlily talk over Wheately's ramblings if you want her to.)

Also, if you do have a Wheatley monitor it will automatically play lines if the player smashes it. Cave Johnson's (and maybe some of Wheatley's core lines) are limited-ranged, so you want to have the bullseye near the player (and preferably next to a loudspeaker model so the sound emanates from the correct location).

My stuff:
[spoiler]- BEE2 Addons | (BEE2)
- Hammer Addons
Maps:
- Crushed Gel
- Gel is Not Always Helpful[/spoiler]

Can I make the cave jhonson sound plays directly on the player?

I figured out a trick for that. Send these two inputs to the bullseye with a delay between: SetParent "!player" and then SetLocalOrigin "0 0 0". The first parents the bullseye to the player, and then the teleports it to their feet. It'll then follow them around. SetLocalOrigin isn't in the FGD, so you'll have to type it in and it'll appear invalid.

The range is pretty good with stationary bulleyes, it won't get too quiet unless players run off far away or something.

My stuff:
[spoiler]- BEE2 Addons | (BEE2)
- Hammer Addons
Maps:
- Crushed Gel
- Gel is Not Always Helpful[/spoiler]

Thanks for the help! This is very useful! However, I'd like to know if there is a list somewhere that tells which 'scene' file plays which line. "catapult_fling_3" doesn't help explain which lines are played. Also, is there a way to play one INDIVIDUAL line? Thanks!

In my first post there's a link to all Wheatley's lines. Hover over one and the url will tell you what scene to use.

My stuff:
[spoiler]- BEE2 Addons | (BEE2)
- Hammer Addons
Maps:
- Crushed Gel
- Gel is Not Always Helpful[/spoiler]