Better understanding help?

Avatar
Lady_Vinyl
25 Posts
Posted Feb 05, 2014
Replied 3 months later
So, after a long time I finally have some time for Hammer again.

And now to my next problem: the sound I want to trigger does not play, when I start the map. I have used the light I have in the room for the output.

At the moment I want to make a room with everything I need for my maps, with the right outputs, instances etc. so I only need to copy and paste everything and just change the outputs and things when I make a new map.

So, to play a soundclip I have this output for the light logic_auto in my room:

My output named: OnMapSpawn
Targets entities named: Voice_Wheatley
Via this input: PlaySound
With a parameter override of: <none>
After a delay in seconds of: 3.00
Fire once only

The Scene file I chose is "vo/wheatley/bw_a4_first_test02.wav" for the entity: logic_choreographed_scene. Name is Voice_Wheatley.

The output from the light is the input for the logic_choreographed_scene. It also is entered there as an input. But after waiting the 3 seconds, the sound doesn't play. Even if I wait longer.

Do I need another Output than OnMapSpawn, when I want to play the sound 3 seconds after the map loaded?

Advertisement
Registered users don't see ads! Register now!
Avatar
FelixGriffin
2,680 Posts
Posted Feb 05, 2014
Replied 17 minutes later
OnMapSpawn is an output for a logic_auto, not for a light. Make a logic_auto and move the output to that.
Avatar
Lady_Vinyl
25 Posts
Posted Feb 05, 2014
Replied 2 minutes later
Still the same, nothing happens.
Avatar
FelixGriffin
2,680 Posts
Posted Feb 05, 2014
Replied 1 hour later
Two other problems: a choreo scene doesn't take a sound file, it takes a scene file. It should end in .vcd, not .wav. And the input is Start, not PlaySound.
Avatar
Lady_Vinyl
25 Posts
Posted Feb 05, 2014
Replied 1 hour later

FelixGriffin wrote:
Two other problems: a choreo scene doesn't take a sound file, it takes a scene file. It should end in .vcd, not .wav. And the input is Start, not PlaySound.

And which instance takes a sound file? That would help me ...

Avatar
FelixGriffin
2,680 Posts
Posted Feb 05, 2014
Replied 1 hour later
Ambient_generic, but it doesn't do choreography or notify you when the sound ends. You have the right entity, but you need to select the scene instead of the sound file.
Avatar
CJLERCH
50 Posts
Posted Feb 06, 2014
Replied 6 hours later
Try looking the topic up on youtube. That's mainly how I started out. I remember I was so happy when I had successfully created a fizzler for the first time. If you can't find what you need on youtube, try the developer site (developer.valvesoftware.com/wiki/Category:Portal_2_Level_Design).
Avatar
Lady_Vinyl
25 Posts
Posted Mar 12, 2014
Replied 1 month later
Okay, I finally found a way for Voice Clips via Ambient_generic. But for now, no cheography.
At the moment there is another problem.

At this point I am doing my maps in the in-game puzzlemaker, then export them with the developer console. Then I can open them in Hammer and just change the voice clips or add some.

But my question is ... when I export the map and open it in Hammer, then I do it this way:
Map -> Entity Report ...
Then I look at the Ambient_Generic thingies and search the sound clips that are used (not that hard to do). But when I click "go to" on the chosen entity, it opens another .vmf file.
In the case of mine at the moment, it is the .vmf file from this path:

C:\Program Files (x86)\Steam\SteamApps\common\Portal 2\sdk_content\maps\instances\p2editor_1960\elevator_entrance.vmf

I used the Style Changer software for Portal 2 to make my map have the style of the salt mines in 1960s. Then I exportet it into .vmf so Hammer could open the file from the puzzlemaker.

There are two problems now:

1.) The opened map in Hammer does not export the textures used in the in-game puzzlemaker. So, when I compile the loaded map for example to test the changed sounds, it uses the standard graphics from Portal 2. So the chamber inside does not look like 1960, it looks like "normal white and black walls". In addition, the Reflection Gel is not dark grey or silver anymore, it is transpearent now (only outside of puzzlemaker and only on ground and walls - when it falls outside the pipe the gel is still dark grey / silver). How can I fix this?

2.) It seems the exported map is splitted into two files which are connected through a "portal world door" or something like this. So, when I want to change the sounds from the exported map, it does not only change the sound clips for this one map, it changes the sound clips for every map which uses the 1960's style - in my case, the file:

C:\Program Files (x86)\Steam\SteamApps\common\Portal 2\sdk_content\maps\instances\p2editor_1960\elevator_entrance.vmf

So '\p2editor_1960\elevator_entrance.vmf' is the instance file for the 1960's files, if I am correct (it's difficult for me to understand everything of that correctly, because most of this I discovered by myself today ... learning by doing).
But I searched the whole files in Hammer for a connection between my exported map file (which is the chamber inside) and the Elevator Entrance Instance (which is the chamber outside, the salt mine). But I didn't find anything related to one of these files. No instances. The only thing I found in the '\p2editor_1960\elevator_entrance.vmf' are two "linked_portal_door", one at the entrance to the chamber inside and one at the exit of the chamber inside. But it has no inputs or outputs. That confuses me. Where are these two things connected?
That is very important for my sound files, since I don't want the same sound clips for every map that uses the same decade.

I hope you understood these two problems and can help me. It's still very confusing and complicated. But I try to learn.
And yes, I asked Google, Youtube and I searched the Developer Site for this. I found nothing related to my problem, since most or all other mappers do the maps from scratch in hammer.
But that's way too complicated for me, since doing maps in the in-game puzzlemaker is much more fast.

Avatar
iWork925
1,080 Posts
Posted Mar 12, 2014
Replied 4 hours later

Lady_Vinyl wrote:
...most or all other mappers do the maps from scratch in hammer.
But that's way too complicated for me, since doing maps in the in-game puzzlemaker is much more fast.

On the contrary, you are having these problems BECAUSE you are using the PTI editor. Sure, its great for quick simple maps (as it was designed for), but you are trying to do quite complex things. I think if you took the time to learn hammer from scratch it would actually save you time in the long run, rather then having to run around with the stupid PTI mods (which just brings Hammer functionality to PTI). This would solve problem #1, with the wall textures. Just retexture the brushes to the 60s textures. Done.

As for problem #2: I don't really know how much you understand instances, but an instance is a LIVE copy of another vmf map through the use of a func_instance. Any changes to the instanced map will be reflected in all instances of it. So if you change the instanced map it will change in all the maps it is instanced. If you have an instance in your map it will be through the use of a func_instance. You can find these with the entity report.

Again, the problem is you are using PTI maps; which if I recall correctly, is made entirely of instances. If you change these instances, they will reflect ALL your maps that use them. It will save you time and grief if you either create these from scratch or create a copy of the instance and change that. I can help you with learning Hammer if you would like; add me: http://steamcommunity.com/id/iwork925

Avatar
TeamSpen210
608 Posts
Posted Mar 12, 2014
Replied 2 minutes later
You want to duplicate the instance file and edit that, then edit the func_instance to point to the new one (maybe start with the quiet instances). The connection is through the linked_portal_door entities, each has the name of the other one in the configuration. I'd really suggest making Old Aperture maps from scratch, maybe using some of the instances since the stylechanger version really isn't too accurate.

You also should hold control when compiling in the PTI, then copy and edit sdk_content/maps/styled/preview so you can get the vmf edited by the Stylechanger.

Avatar
Lady_Vinyl
25 Posts
Posted Mar 13, 2014
Replied 19 hours later
First of all, thanks to TeamSpen210 for the puzzlemaker trick with holding ctrl while compiling. Now I have the style changed textures in Hammer when I open the VMF that is automatically exported.

Another big thanks to you iWork925, who took the time to explain me how to trigger voice clips. Otherwise, I still would despair at such 'easy' things (I say easy, because it is easy to most of you Hammer users I think).

But now to my next problem. It is an issue with the sound clip at the exit. When I enter the exit room, I have triggered a sound clip for beating the test chamber. Works fine so far.
But when I leave the exit room to the catwalk that leads to the elevator (so, when the door from the exit room closes as I leave it) the voice clip stops playing, because I change the map (from the test chamber inside to the outside "p2editor_1960\elevator_entrance.vmf").
How can I avoid the voiceclip stopping? When I export a puzzlemaker map as VMF via console, the random voice clip at the end of the test chamber does not stop playing until it's over. I want to have that too. It starts playing in the exit chamber and keeps playing even when leaving to the catwalk outside.
But I want to avoid putting the voiceclip at the end into the Elevator Entrance VMF, because every map that is in 1960 style uses it, and I don't want the same soundclips over and over again.

Avatar
RustyDios
154 Posts
Posted Mar 13, 2014
Replied 1 hour later
If you have copied the default instances and started to use your own copy then you could put *$soundclip * into the sound file name of the ambient_generic. Then place a func_instance_params into the instance. Set up the option for $soundclip to be a string variable and the default field to the soundclip you want played most (copy the filepath as it appears as if you had selected it for an ambient_generic). The "$" symbol acts as special wildcard in an instance, as a placeholder for information that can be put in later.

Then in your main map click on the instance and you will now see a $soundclip ??? parameter. The ??? will use the default value stored in the func_instance_params, however you can replace it with a new/different soundclip path (again as though you had selected it in an ambient_generic). With this method you can then use that same instance in numerous maps and have a different soundclip played in each one if you wanted without doing tons of extra work.

Hope that helps you with future maps.

As to your current problem the likely cause is audible range (the change from one section to the next puts you out of audible range of your ambient_generic.. maybe) ... you can solve this by checking the play everywhere flag of your ambient_generic and also possibly by putting !player into the source entity name field. (!player is another special Hammer wildcard that targets the player character, useful in many cases. In this case it puts the player as the center/origin of the audio.. not the location of your ambient_generic)

PS. By doing these things you are starting to learn Hammer ... not so hard really is it, one small step at a time

Avatar
Lady_Vinyl
25 Posts
Posted Mar 14, 2014
Replied 14 hours later

RustyDios wrote:
If you have copied the default instances and started to use your own copy then you could put *$soundclip * into the sound file name of the ambient_generic. Then place a func_instance_params into the instance. Set up the option for $soundclip to be a string variable and the default field to the soundclip you want played most (copy the filepath as it appears as if you had selected it for an ambient_generic). The "$" symbol acts as special wildcard in an instance, as a placeholder for information that can be put in later.

First Question: should I give the ambient_generic the name $soundclip or is 'soundclip' just a placeholder for any name?

Second Question: the func_instance_params, should it be in my test chamber (inside) or outside? (elevator map)

Third Question: When I put the sound file name in the default field, when the func_instance_parms is in the elevator map outside, then this chosen path will play on every map, will it?
Also, the copied path of the sound is too long for the default field.

RustyDios wrote:
Then in your main map click on the instance and you will now see a $soundclip ??? parameter. The ??? will use the default value stored in the func_instance_params, however you can replace it with a new/different soundclip path (again as though you had selected it in an ambient_generic). With this method you can then use that same instance in numerous maps and have a different soundclip played in each one if you wanted without doing tons of extra work.

In my main map, on which instance? The 'func_instance_parms' or the 'ambient_generic'?

Also, in both instances I can't see a ??? parameter.

RustyDios wrote:
As to your current problem the likely cause is audible range (the change from one section to the next puts you out of audible range of your ambient_generic.. maybe) ... you can solve this by checking the play everywhere flag of your ambient_generic and also possibly by putting !player into the source entity name field. (!player is another special Hammer wildcard that targets the player character, useful in many cases. In this case it puts the player as the center/origin of the audio.. not the location of your ambient_generic)

The !player command does not work, it's marked red. Since my test chamber is a bit big, I can't hear the sounds when I move further away from the ambient_generics. I have checked the 'play everywhere' flag on every ambient_generic. It doesn't seem to do anything.

That's a problem I would like to solve too. Like hearing them everywhere. !player seems not to work. Is there another way to solve that?

Avatar
RustyDios
154 Posts
Posted Mar 14, 2014
Replied 2 hours later
Obviously I haven't explained it as well as I thought

Clicking the "play everywhere" flag should make them.. er.. play everywhere.. not sure why that's not working..

The !player is a wildcard and will always (I think) show red in Hammer (same as !activator or !caller), but it does still work as intended...

Give me a minute and I'll think of a better way to explain the func_instance_params and it's use (or someone else can jump in and explain it better then me !)

Avatar
Lady_Vinyl
25 Posts
Posted Mar 14, 2014
Replied 2 hours later

RustyDios wrote:
The !player is a wildcard and will always (I think) show red in Hammer (same as !activator or !caller), but it does still work as intended...

Well, the sound still comes from the ambient_generic. When I go away from their position, the sound volume goes down. Gets louder when I get onto it. (Flag 'play everywhere' is checked, '!player' is also in the field 'source entity name'. Seems to do nothing)

Avatar
RustyDios
154 Posts
Posted Mar 14, 2014
Replied 31 minutes later
Okay. So try only ticking "play everywhere" OR sourceentityname = !player. See if that makes a difference... If not, then someone else will have to help here because I'm out of ideas.. sorry I couldn't help further

You want to name your ambient_generic whatever you want (its "outside" in the elevator map, right?). In the Sound Name field is where you want the $wildcardnamedthingwhateveryoulike. The important part is the $ . Copy what would be in this box if you had browsed to a soundfile and selected it.
Also "outside" (in the elevator map) you want to place the func_instance_parms. With a Parm of $wildcardnamedthingwhateveryoulike (it should do this automatically if done in order). The value field set to string. The default field set to what you had copied before. Save. Exit the elevator map.

In your main map, find the func_instance entity that points to the elevator map. It will now have a Parm $wildcardnamedthingwhateveryoulike ??? field on it. Leaving it like this will play your default from the elevator map. Changing it here will replace it with something different. Remember it needs to be written as though you had selected it from browsing the soundfiles.

I hope I can get across what I'm aiming for you to set up here. This way every main map that uses the elevator map will default to the default soundfile unless you change it in the func_instance entity. It allows you to use the same elevator map multiple times choosing a different clip if you want to.

Hope that helps..

Avatar
Lady_Vinyl
25 Posts
Posted Mar 14, 2014
Replied 46 minutes later

RustyDios wrote:
You want to name your ambient_generic whatever you want (its "outside" in the elevator map, right?). In the Sound Name field is where you want the $wildcardnamedthingwhateveryoulike. The important part is the $ . Copy what would be in this box if you had browsed to a soundfile and selected it.
Also "outside" (in the elevator map) you want to place the func_instance_parms. With a Parm of $wildcardnamedthingwhateveryoulike (it should do this automatically if done in order). The value field set to string. The default field set to what you had copied before. Save. Exit the elevator map.

'$wildcardnamedthingwhateveryoulike' there is written wildcard in there. Should I write '$!name' then or '$name'?

Okay. So '$wildcardnamedthingwhateveryoulike' is the sound name. Copy.
Now to my problem ... when the Parm Name must be '$wildcardnamedthingwhateveryoulike', then it is the copied from before. So the Name / Parm must be named '$wildcardnamedthingwhateveryoulike', the value is 'string' and the default is also '$wildcardnamedthingwhateveryoulike'? I'm a bit confused ...

Another problem is, they are not linked with func_instance. Instead of this, they use linked_portal_door. I tried what you tried to tell me, but the "linked portal door" thingies don't seem to have a Parm like "$wildcardnamedthingwhateveryoulike ??? field" ...

I am just despairing again. Why I don't understand these things. It seems so complicated for me ...

Avatar
RustyDios
154 Posts
Posted Mar 14, 2014
Replied 47 minutes later
$name ... $!xxx will likely confuse the engine.
In your map. Select your elevator instance. Open properties. Click Edit Instance. Elevator .vmf opens. Bingo step one done.

Find/add your ambient_generic. For the sound name. Browse to your soundfile (a default one you wish to use in most of your maps). Select it. Copy what is now in the sound name field. Delete it. Type in $name. Apply changes. Close properties. Save.

Find/Add a func_instance_parms. It should have a parm that says $name. value is string. default is the soundfile name that we copied from the ambient_generic. Apply changes. Close properties. Save.

Save. Yes for no reason other than your using Hammer.
Close the elevator .vmf.
Save.

Back in our main map now? .. good. Click the elevator instance. The func_instance that points to the elevator. In Hammer this is what links your map.vmf to the elevator.vmf. It will have a parm field of $name ???. Place here a soundfile name as if you had picked it from the sound file browser.

(The linked_portal_door is an entity in Hammer to connect two places INSIDE a map together as though there was no distance between them... as you can see there is when viewed in Hammer.)

Do Not Despair. You're not understanding these things because you're kind of jumping into the Hammer deep end without bothering about the basics, thinking the PTI IS the basics. What you want to do is actually rather in-depth Hammer stuff. It is complicated for all of us, not just you.. Stick at it and one day it will just "click" into place.

Hope that helps...

Avatar
Lady_Vinyl
25 Posts
Posted Mar 14, 2014
Replied 21 minutes later

RustyDios wrote:
$name ... $!xxx will likely confuse the engine.
In your map. Select your elevator instance. Open properties. Click Edit Instance. Elevator .vmf opens. Bingo step one done.

Find/add your ambient_generic. For the sound name. Browse to your soundfile (a default one you wish to use in most of your maps). Select it. Copy what is now in the sound name field. Delete it. Type in $name. Apply changes. Close properties. Save.

Find/Add a func_instance_parms. It should have a parm that says $name. value is string. default is the soundfile name that we copied from the ambient_generic. Apply changes. Close properties. Save.

Save. Yes for no reason other than your using Hammer.
Close the elevator .vmf.
Save.

Back in our main map now? .. good. Click the elevator instance. The func_instance that points to the elevator. In Hammer this is what links your map.vmf to the elevator.vmf. It will have a parm field of $name ???. Place here a soundfile name as if you had picked it from the sound file browser.

(The linked_portal_door is an entity in Hammer to connect two places INSIDE a map together as though there was no distance between them... as you can see there is when viewed in Hammer.)

Do Not Despair. You're not understanding these things because you're kind of jumping into the Hammer deep end without bothering about the basics, thinking the PTI IS the basics. What you want to do is actually rather in-depth Hammer stuff. It is complicated for all of us, not just you.. Stick at it and one day it will just "click" into place.

Hope that helps...

[s]Okay ... so I apologize to say that I don't need this procedure ... I just tried putting away the 'play everywhere' and only putting '!player' ... it worked very well for this problem ... sound and trigger on main map ... sound goes with player everywhere, even on another map ... big thanks to you anyways ... because you said earlier I should try it this way and it's much less complicated.
Without you I still would have this problem. Thank you.

So now I feel very sorry that you had to write this long post ... but I hope you are not that mad about it ... just glad I made it a lot easier.[/s]

The sentence of yours I marked red: I can't seem to find this one. Maybe it is not named automatically by the PTI. So I could search for eternity I think.

PS: Is it a problem if this thread could be still open? In a few weeks I would need help with the choreographed_scenes for the Wheatley monitors ... but for now that's all ... so I guess I'll post later again. When I get the time to.

PPS: Thanks to all of you that you're ready to help and don't get mad when somebody like me makes mistakes even when you try to explain as good as you can.

EDIT: The first time I tested it this way it worked, but now it does not work anymore?? Tell me what I did wrong! (striked through / green) ...

Advertisement
Registered users don't see ads! Register now!
Avatar
RustyDios
154 Posts
Posted Mar 14, 2014
Replied 26 minutes later
Okay.. well at least we got your sound problem sorted
At the very minimum reading through this thread/posts will at some point aid you (and others) in your future maps. Maybe. I have very little experience with converting PTI maps into Hammer maps. For me it is just easier to build it in Hammer from the start. Possibly because PTI didn't exist when I began to learn, I had no other option but to start learning Hammer. I can see the limits of PTI and have no intention of making maps with it. It is good at laying out a rough puzzle concept very quickly though.

I think with some of the ideas you seem to have in mind learning Hammer will benefit you (ie; I haven't even tackled monitors, or in fact custom sound lines either! - my map is eerily quiet unfortunately with regards to Glados/vo lines!). I think our biggest problem here is/was communication and our interpretations of "instance" and "goes everywhere, even on another map" ...

In short, keep posting your questions, if you're willing to listen and learn there will be people willing to speak and help. I'm sure the more PTI maps you modify the better grasp of Hammer you will attain, until you no longer require PTI at all ... ... ..