NPC Opens door. Created 8 years ago2016-02-04 10:17:49 UTC by KB90 KB90

Created 8 years ago2016-02-04 10:17:49 UTC by KB90 KB90

Posted 8 years ago2016-02-04 10:17:49 UTC Post #328658
Hello. So I'm almost done with TWHL World map. Now only polishing left.

I struggle to find any tutorials how to make Barney go to doors and open them with eye scanner, than if possible go back to position where he was standing before this task.
Also, how to make that if you kill Barney, game is ower.
Another this I was struggling is how to make scientist sit, I put monster_scientist in map, choose animation sitting2, put him in chair next to table, and in game he appears standing on table.

One more thing - how to make scientist silent? Because I need to put custom voice acting, witch obviously will sound different from what they are talking now, so to not confuse player I need scientist to be silent, than say his line when player shows up and then remain silent.

Thank you!
Posted 8 years ago2016-02-04 13:11:54 UTC Post #328662
What you're looking for is the scripted_sequence entity. To make barney use a retinal scanner, put a scripted_sequence in front of a scanner (set its angles to face it too) make him use the action "retina"
You can then trigger the door to open separately or use the animation action.... Which idk what that is right now, ill have to check the qc.

The sitting scientists need to be told to sit... Also with scripted_sequences. They're standing because thats the default behavior.

As far as the speech, modify the sentences.txt to only inclide the lines you want him to say.

Although now I'm not sure how I'm going to make that work between levels. That's my problem though not yours
Tetsu0 Tetsu0Positive Chaos
Posted 8 years ago2016-02-04 13:37:13 UTC Post #328663
You should have a flag to "Gag" the scientists. That should stop them engaging in idle chatter and will only speak when triggered to do so.
monster_urby monster_urbyGoldsourcerer
Posted 8 years ago2016-02-05 00:10:48 UTC Post #328669
As for the level change problem. Safe your sitting Scientists in trigger_transition although I usually had problems back then that they were out of place flying mid air or outside the map even. Decompile the official hl1 maps and see how it was done there in Sector C between the map with the Hev room and the sitting scientists greeting you with "Good morning Gordon."
Posted 8 years ago2016-02-05 21:48:36 UTC Post #328683
Tetsu0, thanks but I still don't understand, could you tell me step by step how to do it? Or at least point me into a good tutorial?
That is about Barney opening doors for now.
Posted 8 years ago2016-02-06 03:31:50 UTC Post #328688
Scripted_sequence:
http://twhl.info/wiki.phpid=159
And
http://twhl.info/tutorial.php?id=53

Barney's action animation will be "retina"
The" target" field in the scripted_sequence can trigger a multi_manager that triggers the door and then another scripted_sequence that makes barney walk back. Mess around with the delay to get the timing right.
Tetsu0 Tetsu0Positive Chaos
Posted 8 years ago2016-02-06 13:00:30 UTC Post #328706
I did it! Thanks Tetsu0.
One more thing, how to make sound play when Barney is scanning his eyes?
Posted 8 years ago2016-02-06 13:35:07 UTC Post #328711
I did it! Thanks Tetsu0.
One more thing, how to make sound play when Barney is scanning his eyes?
If I remember correctly, it's the "Unlock sound" property in the "func_button". Your best bet would be to decompile one of Half-Life's map and see how it's done (or view directly the map with Crafty or BSPViewer).
Posted 8 years ago2016-02-06 14:32:00 UTC Post #328718
Yeah I just had a quick setup and i got it working well enough but it's sketchy at best and I think the whole thing may require a multimanager to handle special effects.
I'm gonna try BSP viewer, i've never done that before...

I made my Retinal Scanner a func_button and i set it's master to the scripted_sequence. The scripted_sequence triggers the button which unlocks the door. It also blinks and plays the sound (power deadbolt 1).

The issues are:
1) there's no 'scanning' sound, only the unlock sound after the scanning process is complete
2) the button only functions after the scripted_sequence completes, which doesn't look great at all.
[blue]---------------EDIT---------------[/blue]
Yeah i checked out map c1a0d, and it's actually a pretty complicated multimanager setup for those retinal scanners.
There's actually 2 scripted sequences used here. One has the scientist walk up to the scanner and then target a multimanager.
That multimanager targets the retinal scanner multimanager and also starts the scripted sequence of the "retina" animation.

The retinal scanner itself is a func_wall with that special texture applied to it. The multimanager triggers that scanner about 15 times, toggling through the animations while the scientist is scanning.
It also targets a sound "retinal blip" about 20 times, on and off for the scanning action.

After all that, the door opens.
Also there's an invisible func_button in front of the scanner that just triggers the 'access denied' sound.
Maybe i'll make up an example map
Tetsu0 Tetsu0Positive Chaos
Posted 8 years ago2016-02-06 17:42:13 UTC Post #328724
I did it! Thanks again. And another question. Why gag does not work? Nether on barney, nor on scientist?
Posted 8 years ago2016-02-06 20:37:49 UTC Post #328731
Not sure, but the gag works for me. Make sure to click "apply" after changing anything.
This may be too little too late, but here's that mockup i was talking about - I had to add descriptions and stuff.
http://twhl.info/vault.php?map=6089
Tetsu0 Tetsu0Positive Chaos
Posted 8 years ago2016-02-06 23:55:54 UTC Post #328736
Hey. I have encountered new problem.
I need grunts to come out of elevator. If I put them in open area, they move fine, but if I put them in elevator, they do not move.

Long story short - just check this test map: http://www.filedropper.com/test_125
Posted 8 years ago2016-02-07 01:02:37 UTC Post #328737
Are you scripting them?
Place info_nodes around the floor, and assign them to a squad. They'll be a bit smarter.
Tetsu0 Tetsu0Positive Chaos
Posted 8 years ago2016-02-07 11:46:36 UTC Post #328749
I did it. I put them one behind other in elevator and there is a delay after elevator door opens, and delay after first grunt comes out. So it works now just as I wanted to. Hopefully it wont break.
The thing is, you have pick something up in map and then go back same path you came, but now you see new grunts arrived in elevator, so it gives map feeling like you are in place where things are happening.
You must be logged in to post a response.