Tefnacht Posted March 13, 2011 Share Posted March 13, 2011 I am looking for the right way to do this. There seem to be so many different ways ... I am a little lost which one is the intended one for my situation. Here is what I want to do: I have a interior cell with some rooms behind a locked (pickable) door being a restricted area with a guard. One way to solve my quest is to sneak in there. The layout is such that it is possible for the player to sneak into the area without being seen. However, if he is seen (either by the guard on duty or another actor in the area) I want an alarm to sound. I placed a couple of animated klaxon activators in the area that start flashing (and stop flashing) the way I want to. Now I also want a sound to loop while the klaxons are flashing. QSTKlaxonB is the sound of my choice. How would I do this? I suppose a sound emitter which I enable/disable is the way to go? The GECK wiki doesn't have much info on those things though and my dosage of trial&error is already taxed for this week.Or should I use a hidden activator with a looping sound attached and then disable/enable that?Or what is with an acoustic space enclosing the restricted area? Or should I use PlaySound/PlaySound3D commands in my scripts? Or something completey different? The alarm loop sound should be audible within and close to the restricted area. In a perfect world, it should be loudest close to the six klaxon lights. Any tips how to do this? Thanks in advance. Link to comment Share on other sites More sharing options...
Tefnacht Posted March 17, 2011 Author Share Posted March 17, 2011 Heh. So nobody here is willing to comment on the problem, let alone give a hint? That is very disappointing. :( I decided to go with sound emitters. After trying some other options, this seems to be the way to go. Still, I don't fully understand what I am doing. Placing a sound emitter into a cell, by clicking the “Create a sound emitter” button, causes a 'primitive' to appear. A box primitive. But when I 'draw' it in the render window, it appears more like a line. It behaves different than drawing a cubic activator primitive.Still, if I double click it and edit the reference data, it IS a box primitive. I ended up making them small cubes and placed them to enclose my klaxon activators. I now have six sound emitters being small cubes, one being a persistent reference and the other fife having their enable state parented to the persistent one. To sound the alarm I enable the persistent sound emitter and they all get going: “Meep! Meep! Meep!” When I disable the parent, there is silence again. Very well. I still have many unanswered questions. For example, if I drag and drop the QSTKlaxonB sound from the object window directly into the render window ... I get a green, transparent thing, looking roughly like a speaker. In the cell window, this reference has the same properties like a sound emitter ... but it isn't a primitive. There seems to be a difference between a sound emitter and a sound dragged and dropped directly ... I don't understand why a sound emitter has a primitive attached at all. What is the point? The shape, size and form of the primitive doesn't seem to matter. The sound emits at the primitives root and as you move away, the sound becomes more silent. IS there a difference between a sound emitter and a sound dropped directly into the render window? If there is: does the shape of the emitter primitive have any effect on the sound?Maybe the primitive is just there so you can click on it, move it and edit it. But if that is the case, why doesn't a sound emitter use the same green, transparent speaker mesh for a marker like a dragged & dropped sound does? What's the point? Any ideas? Anyone? Link to comment Share on other sites More sharing options...
FuzeTek Posted March 27, 2011 Share Posted March 27, 2011 (edited) Most of your questions I cannot answer :confused: However I'm sure the basic idea of what you want can be achieved with a script. Dragging the Klaxxon sound into the render window gives you the Green icon, ingame it will play automatically and forever. If you check initially disabled in the properties it wont play when you enter the game and then can be activated through the script with (EX: KlaxxonSoundREF.enable) which will cause the alarm sound to start. You can then add (KlaxxonGlobeREF.playgroup Left 1) which will cause the corresponding Klaxon Globe to start spinning. I do not know the script you would use to have this activate if you're spotted by a guard as I only use the onplayerEnter and onActivate scripts.\\ And I'm not 100% sure on this, but I think the create sound emitter button is to limit the range on sounds you have in the Cell so they don't bleed into Adjacent rooms. But Don't quote me on that Edited March 27, 2011 by FuzeTek Link to comment Share on other sites More sharing options...
Tefnacht Posted March 27, 2011 Author Share Posted March 27, 2011 Thank you for your reply. That is pretty much how I ended up doing it. Just that I used sound emitters instead of dragging and dropping sounds directly from the object window. I did some testing to see if there is any difference between those two and I couldn't really find any. My testing was not very thorough though. I assume now that the X size of the sound emitter primitive is indeed used as some kind of multiplier to control the inner and outer 2D sound radius used to attenuate the sound ... but how it works exactly is beyond me. Well, my sounds are audible, loud enough if you're standing close to a klaxon and they carry far enough through the cell before they get too silent. I am quite happy with it. Link to comment Share on other sites More sharing options...
Recommended Posts