Please or Register to create posts and topics.

How to get that Sound before GLaDOS speaks?

PreviousPage 2 of 3Next
lpfreaky90 wrote:
see how long the on and off sounds take; (onwhateverstartstheannouncement; turnonsound;playsound;0.00
onwhateverstartstheannouncement; announcement; theinputtostartachoreochravedscene; time it takesfor turnoffsound.
I believe scenes have a onendscene thing; use that to trigger turnoffsound. If that doesn't work let the thing that triggers the scene play turnoff sound after a delay equal to the lenght of the turnonsound and announcement together.

Hope that helped.

Sure, that should work. But isn't that a little too complicated?

Does anybody know how Valve did it in their maps? I've taken a look at them, but couldn't find anything.

Yea; it's somewhat complicated. It's just something I came up with. I personally never even noticed this sound. I might be able to take a look at it but it'll take a couple more hours I'm afraid.

andu wrote:
Sure, that should work. But isn't that a little too complicated?

Does anybody know how Valve did it in their maps? I've taken a look at them, but couldn't find anything.

If you did read my message (3rd post) you would know. The scenes are however played through Glados.nut not through a direct output. This is how you would play a scene file through a normal output:

  1. Put the glados_gen_actor.vmf instance from portal 2sdk_contentmapsinstanceschoreo into your map

    Remember: the coop GLaDOS lines are used with the coop_glados_ents.vmf instance and the singleplayer uses the one listed above. If you want to use lines from both coop and SP you will need to place both instances in AND collapse the instance, then change the name of @glados to something different.

  2. Using a button or w/e output you are using to play the sounds; make it play your selected scene file:
    outputs.jpg

  3. Find the correct number of your wanted line through: ...portal2scriptsvscriptschoreoglados_scenetable_include.nut

    Be warned: many of the scene files play directly after each other -> you can tell what does by looking at the out-dented comments '//' and the lines that follow each other are indented '//'

    Code: Select all
       //BlueFirstToEnd
          //Blue is awarded five points!
          SceneTable["mp_coop_startBlueFirstToEnd01"] <- ...
          //Again, those are science collaboration points, which you should not confuse...
          SceneTable["mp_coop_startBlueFirstToEnd02"] <- ...

    To find a line of code, first I would browse through the lines here then go into glados_scenetable_include.nut and find the correct lines in the comments which Valve nicely added for us. Grab the name of the SceneTable array element such as SceneTable["mp_coop_startBlueFirstToEnd01"] and find it in the SceneTableLookup[] array below. In this case it is SceneTableLookup[8]

  4. Put the number in your output shown in the picture above: GladosPlayVcd(NUMBERHERE)

I was thinking of contributing a VDC page showing the scene files with their subsequent numbers, but I would have to go through hundreds of lines also I bet there is an easier way.

?????????????????????????????TWP Releases | My Workshop
chickenmobile wrote:
I was thinking of contributing a VDC page showing the scene files with their subsequent numbers, but I would have to go through hundreds of lines also I bet there is an easier way.

I'll try to put a script together to match the vcd number to the voice line.

@chickenmobile thanks for your great post!

But when I try this I get an error message in my console:

AN ERROR HAS OCCURED [the index 'GladosPlayVcd' does not exist]

CALLSTACK
*FUNCTION [main()] InputRunScript line [1]

LOCALS
[this] TABLE
Entity @glados encountered an error in RunScript()

Any idea how this can be solved?

andu wrote:
@chickenmobile thanks for your great post!

But when I try this I get an error message in my console:

AN ERROR HAS OCCURED [the index 'GladosPlayVcd' does not exist]

CALLSTACK
*FUNCTION [main()] InputRunScript line [1]

LOCALS
[this] TABLE
Entity @glados encountered an error in RunScript()

Any idea how this can be solved?

That error appears either when:

  1. You called a the wrong script
  2. Your script input is in the wrong format (copy the picture).
  3. Your script has a syntax error.

I hope for your sake that there isn't a syntax error in your glados.nut otherwise portal won't play scenes.

Did you put the glados ents instance in your map? Also what input are you giving @glados?

?????????????????????????????TWP Releases | My Workshop
BEARD! wrote:
chickenmobile wrote:
I was thinking of contributing a VDC page showing the scene files with their subsequent numbers, but I would have to go through hundreds of lines also I bet there is an easier way.

I'll try to put a script together to match the vcd number to the voice line.

I did just that, and posted this to the wiki as a proof-of-concept. If anyone finds it useful or knows how to make it more useful, let me know. I'll try to get round to parsing more files (e.g. single player) too.

Yes, I use the glados instance in my map. Then I did as you said and searched my line in glados_scenetable_include.nut

Image

And of course the corresponding number.

Image

Then I created a relay which is triggered when I want GlaDOS to speak. It has the following output:

Image

@andu: it seems like sp_a2_pull_the_rugstart01 is commented out on line 1356.
(the // before the name) If that is the case the Vcd won't load either; I'm not 100% sure of it but try using one that doesnt have a // before the mapname.

lpfreaky90 wrote:
@andu: it seems like sp_a2_pull_the_rugstart01 is commented out on line 1356.
(the // before the name) If that is the case the Vcd won't load either; I'm not 100% sure of it but try using one that doesnt have a // before the mapname.

That is correct. If it is commented out, the game will pull an error because the SceneTable array cannot find that element. If this sound does exist and you really want to use it, you probably need to do it the original way lpfreaky or someone else mentioned above. ->
An ambient generic dingon sound played before your glados voice plays, a delay, and then the dingoff sound after she has finished speaking.

Not many people know that when Glados speaks, the game volume dims, is extremely 'ehoey' and some of the sounds pitch changes (usually pitch 100) because Glados sounds have a determined preset in the scene files. Presently, not many people will notice that is is missing. -> lp said that they didn't even notice the ding sound in the first place.

EDIT: Well done Beard. The tables though are a bit hard to follow. I suggest having 1 table for all the lines with The title whited accross the whole width of the table and the subtitle in an un-whited row.
e.g.
Title = mp_coop_start
subtitle = BlueFirstToEnd

?????????????????????????????TWP Releases | My Workshop
PreviousPage 2 of 3Next