Page 1 of 2 12 LastLast
Results 1 to 10 of 16

Thread: fx/dummy.tik acting the dummy

  1. #1

    Default fx/dummy.tik acting the dummy

    G'day folks,
    I have six fx/dummy.tik models to act as speakers. All six have the target name of "$speaker" and all have "ALWAYS DRAW" selected.
    I actually have 18 speaker boxes (physical brushes) but only six will work at a time for some reason.
    I've tried it with dummy.tik models then I removed those and converted the speaker box brushes as script objects, either way only six work at a time.
    So I've gone back to using dummy.tik models.

    The major issue I'm having is...
    I have mixed some audio to simulate a civilian radio broadcast (3 French songs).
    I'd like the radio sound track to loop continuously (even if it's only six speakers) but for some reason it doesn't play through all speakers at the same time.
    There is a second or so in the audio track between each speaker giving an unwanted echo effect.
    Then on top of that, the first song keeps restarting every time I approach a speaker.
    I've tried it as mp3 and as wav format with the same results.
    I know the sound file works flawlessly outside of the game, in either wav or mp3 format.
    When I asked the script to "playsound" (as script models) it works perfectly but as I said, I'd like it to continuously loop.

    I have this in a preparation thread for something else.
    Code:
    	$speaker loopsound accaradio
    Ironically, the map's name is "loop". lol I wonder?

    As always, any help would be greatly appreciated.
    Cheers.

  2. #2

    Default

    Is this a map you can easily share? Or if not, can you make a test map where this happens so I can take a look properly? Can you also provide the alias definition for "accaradio".

    And at the end of the day, if playsound works, you can always do something like:


    while (1)
    {
    $speaker[1] playsound accaradio
    $speaker[1] waittill sounddone
    }


    for each speaker.

  3. #3

    Default

    Hey Smithy, thanks for the reply.
    Code:
    aliascache accaradio sound/loop/FrenchSongs.wav soundparms 0.25 0.25 0.0 0.0 500 500 item loaded maps "dm obj dm/loop"
    Yeah no probs mate. I've sent it to you via email.

    I even tried a modified version of your fish script you did for [TWL]Shadow, changing the word "fish" to "speaker" and placed it in the "global" folder but as you know scripting is far from my strong point. lol

  4. #4

    Default

    Hey, no probs!

    Try using the 'local' channel instead of 'item', as you may be limited to the amount of sounds that can be played on the item channel. It also may act differently in regards to sound spatialisation/localisation. Also use 'streamed' instead of 'loaded'.

    Use this:


    local.master aliascache accaradio sound/loop/FrenchSongs.wav soundparms 0.8 0.0 1.0 0.0 150 800 local streamed maps "dm obj dm/loop"


    And see if it plays on more speakers now. I didn't notice the speakers restarting when moving away and approaching them, so not sure how to replicate that.
    Last edited by 1337Smithy; November 13th, 2019 at 02:42 PM.

  5. #5

    Default

    Cheers mate I gave it a go with the "local streamed maps" but it still repeats or echos and restarts every time I approach a speaker.
    Admittedly I didn't alter the soundparms volume, just the quoted text. But that shouldn't make a difference.

    edit: I've tried those volume settings and it has only cured the echo in that you can't hear the bloody speaker until your nose touches it. lol
    Turn it back up to what I had and you'll hear the echo alright. Yet oddly enough only at each speaker and silence in between speaker locations.
    So it isn't what I first thought, hearing more than one speaker at a time.

    From the reception / foyer wait to hear the singing start for a moment then go outside, run around the cars and back inside. It starts over again from the musical introduction (start of the audio track).

    Of course PC systems differ immensely with this game.
    On some of my maps Shadow would see huge gaps in patches and only his mate "Noiz" would see them in terrain where as Shadow & I couldn't.
    To me they were all perfect but screenshots proved otherwise.

    I think I'll go with your suggestion of the "While" loop.

    Cheers mate.

  6. #6

    Default

    I honestly can't replicate the sound restart. I go over to the other side of the map and go back and the speakers have continued to play the songs. The min and max distance (the last two numbers) will probably need tweaking in the example I provided. E.g. 500 and 800 instead. I'm testing this with 'playsound', by the way. I didn't change anything else in the script you sent.

    Of course PC systems differ immensely with this game.
    On some of my maps Shadow would see huge gaps in patches and only his mate "Noiz" would see them in terrain where as Shadow & I couldn't.
    To me they were all perfect but screenshots proved otherwise.
    Yeah, it's not so much the PC (in these cases) that are the issue, but the video settings of the game . Shadow's problem was his config added a higher value than you can attain from the in-game options for 'Curve Detail' (which are patches), which was an option that the developers didn't complete or forgot to remove, making all of his meshes unstable. We figured it out when he tested my map and the patch tunnel I made contained holes on his side. I asked him to check his curve options and voila, they were back to how they looked on my screen.

    Regarding Noiz, that could be due to 'Terrain Detail', also found in the 'Advanced' options in-game. You can alter even more via console or config using cvars that start with 'ter_':

    Code:
    seta ter_error 7
    seta ter_maxlod 5
    seta ter_maxtris 16384
    That's what I have in my config. As well as everything else set to the max they can allow on the game UI. LoD settings will change the look of the game quite dramatically from player to player. It's similar to the model flickering that some experience, which is down to the renderer config (r_lod etc...).

    What are your sound options set to, out of interest? Oh, and are you making this map for AA or an expansion?

    Also bear in mind that your walls are detail so you may be able to hear the speaker below the reception when perhaps you shouldn't, because the script_model isn't being culled. It may be good to add some structural sections to cut off the downstairs from the upstairs etc, which will help fps, but because that building is made with nodraw brushes it wouldn't allow it, so it will need changing to caulk. It's always good to use nodraw for detailing only to stop yourself getting stuck further down the line . I know you're still very much in the building phase of this map so ignore this if you've already made plans to fix, but the light seeping to the upstairs above the reception, as an example, can be fixed by moving the reception wall a bit higher (so it ends somewhere inside the area where the floor brushes meet the wall) and raising the bottom of the upper walls higher as well. Or you can just make a new brush between the upper and lower walls, which should also remove it.
    Last edited by 1337Smithy; November 14th, 2019 at 02:39 AM.

  7. #7

    Default

    Quote Originally Posted by 1337Smithy View Post
    Yeah, it's not so much the PC (in these cases) that are the issue, but the video settings of the game . Shadow's problem was his config added a higher value than you can attain from the in-game options for 'Curve Detail' (which are patches), which was an option that the developers didn't complete or forgot to remove, making all of his meshes unstable. We figured it out when he tested my map and the patch tunnel I made contained holes on his side. I asked him to check his curve options and voila, they were back to how they looked on my screen.

    Regarding Noiz, that could be due to 'Terrain Detail', also found in the 'Advanced' options in-game. You can alter even more via console or config using cvars that start with 'ter_':
    Yeah the issue was on my side only, not Noiz his side, he had everything set fine .

    As Smithy said, I had my curve details set to an option not included in the game (manually changed via my unnamedsoldier.cfg), which caused the issue. That's what I get for trying to get more out of the game than was intended xD.
    All Acca's maps look perfect now for me

  8. #8

    Default

    Quote Originally Posted by 1337Smithy View Post
    What are your sound options set to, out of interest? Oh, and are you making this map for AA or an expansion?
    Geez mate, now you're getting personal. lol I had to look.
    Two speakers, sound quality "High". I think they were left on the default.
    I've just changed it to "Surround sound".

    Oh and it's made for AA (& expansions) because not everyone has Spearhead or Breakthrough.
    Maybe that's why you aren't hearing what I'm hearing. Are you testing it in Spearhead?

    Quote Originally Posted by 1337Smithy View Post
    Also bear in mind that your walls are detail so you may be able to hear the speaker below the reception when perhaps you shouldn't, because the script_model isn't being culled. It may be good to add some structural sections to cut off the downstairs from the upstairs etc, which will help fps, but because that building is made with nodraw brushes it wouldn't allow it, so it will need changing to caulk. It's always good to use nodraw for detailing only to stop yourself getting stuck further down the line . I know you're still very much in the building phase of this map so ignore this if you've already made plans to fix, but the light seeping to the upstairs above the reception, as an example, can be fixed by moving the reception wall a bit higher (so it ends somewhere inside the area where the floor brushes meet the wall) and raising the bottom of the upper walls higher as well. Or you can just make a new brush between the upper and lower walls, which should also remove it.
    No, I hadn't given it a second thought to go back and change the brushes to caulk. Thank you.
    For years I've used caulk for everything except transparent brushes (windows, water). This time I finally follow examples of the default maps and somebody spots it. lol
    I've noticed that "No Draw" can't be hollowed with "CSG Subtract" and most of the default map brushes are "No Draw". Even though every tutorial says to use "Caulk".
    I was thinking that "No Draw" might save a bit on FPS or something because I couldn't figure out why they preferred it more than caulk.

    As for the light leaking around walls, etc. I haven't gone back to address those areas as yet, but I will make them structural, thank you once again.

    After changing the script from "loopsound" to "playsound" I haven't any radio / speaker sound.
    So I moved on to another map for the time being, just to calm down. lol
    I started this map on the 12th of March but soon got jack of it and put it aside until last week. lol

    Thanks again for your advice, champ.


    G'day Shadow,
    I recall Noiz seeing a huge gap in the terrain of my Sieger map where as you and I only saw it as less than half of that size.
    It was an early stage which ended up not making the final cut because the map was so big.

    Anyway I'm glad that you have it sorted and that ..... *drumroll*

    Quote Originally Posted by Shadow View Post
    All Acca's maps look perfect now for me
    After all of the years of shit-stirring you've lashed at me I've gotta screenshot this, print it and frame it on the wall. lol
    Ahh good times.

    Hurry up and get back into the swing of things ya crazy Dutchman. I've got about 5 maps for you to test.
    Just kidding, let me know when you are ready. Oh and don't forget to check out that pk3 Explorer I made for ya.
    Last edited by AccadaccA; November 14th, 2019 at 05:30 AM.

  9. #9

    Default

    Quote Originally Posted by AccadaccA View Post
    No, I hadn't given it a second thought to go back and change the brushes to caulk. Thank you.
    For years I've used caulk for everything except transparent brushes (windows, water). This time I finally follow examples of the default maps and somebody spots it. lol
    I've noticed that "No Draw" can't be hollowed with "CSG Subtract" and most of the default map brushes are "No Draw". Even though every tutorial says to use "Caulk".
    I was thinking that "No Draw" might save a bit on FPS or something because I couldn't figure out why they preferred it more than caulk.
    The brushes that they don't want to be structural are often nodraw, that's all. The devs used nodraw for details and fake buildings as a 'best practice' because when you forget to convert some parts to detail (it's easily done) it doesn't really matter, as the compiler will do it for you when reading the nodraw shader. That's the only benefit to using it (as well as for transparent materials of course) .

  10. #10

    Default

    I decided to have a proper look into this for you, now I had a bit more spare time . I think I've got a solution that works, thanks to the opm code (thanks, guys!). This assumes it works for you though, Acca :P. I'll email you the edited script, but below is what I changed to get it in working order:


    local.master aliascache accaradio sound/loop/FrenchSongs.wav soundparms 0.75 0.0 1.0 0.0 20 75 auto loaded maps "dm obj dm/loop"


    I used 'auto' channel and 'loaded'. Auto channel always plays if possible and doesn't override any sounds. I also changed the volume, min and max distance as well. Don't worry about it looking too low, as it works fine with the loopsound code. You can modify them though if you don't like the result.


    $speaker forceactivate
    $speaker loopsound accaradio 1.0 levelwide


    This will allow it to play without any restarts as it doesn't have a cutoff distance. It does get quieter as you move further away, so much so that it can't be perceived, but the entity is still technically playing a sound. This is the hitch that comes with loopsound that I didn't know about until I discovered 'levelwide' as a valid argument by looking at opm. The float before it is just the volume, which is set to the maximum of the base volume set on the aliascache. I tested and all 4 speakers play the music and continue to do so no matter where you are on the map.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •