Closed pizzadox11 closed 4 years ago
sorry guys, i didnt remember but i made an input to ambient_generic to stopsound first then kill after delay of 3 secs.
my mistake was stopsound keyvalue because if you stop ambient_generic when playing looped sound it gets stuck playing it in entire map
so i found a way to stop ambient_generic from playing but it almost never works right, only if you type manually ent_fire
Can you come up with a map that displays these issues?
Can you come up with a map that displays these issues?
its my own map, i already updated the map on workshop and removed that specific ambient_generic if you really mind, on gamebanana i still have a version from 6 months ago https://gamebanana.com/maps/207406 i tried to create optional button to remove a waterfall in my map in case people dont like it, i dont have anymore the version with the button that stops the sound but you can do the same with ent_fire command on the map from gamebanana ambient_generic name is "waterfallsound" so you need to "ent_fire waterfallsound kill/stopsound/volume 0"- they all dont work
or just create a new map with func_button and ambient_generic that plays a preready made looped wav file(in my case its was looped wav water sound from css to mimic waterfall sound) and tie func_button to ambient_generic to stopsound input and test it in game, just dont forget to name ambient_generic so you can ent_fire it in game to test more
and i found out in case you do stop the sound with volume 0 and then kill, it stops just for clients that online at the moment, i mean if you stopped it and you reconnect to server the sound starts playing again until you stop it again like i did with that silly timer code i posted above
That map doesn't have an ambient_generic with that name..
] lua_run for i,ent in pairs( ents.FindByClass("ambient_generic") ) do print( ent, ent:GetName() ) end
> for i,ent in pairs( ents.FindByClass("ambient_generic") ) do print( ent, ent:GetName() ) end...
Entity [23][ambient_generic]
Entity [24][ambient_generic]
Entity [27][ambient_generic]
Entity [28][ambient_generic]
Entity [34][ambient_generic]
Entity [50][ambient_generic] shliftsound
Entity [51][ambient_generic]
Entity [68][ambient_generic]
Entity [69][ambient_generic]
Entity [73][ambient_generic]
Entity [74][ambient_generic]
Entity [75][ambient_generic]
Entity [897][ambient_generic] soda_dispense_sound1
Entity [898][ambient_generic] soda_empty_sound1
Entity [1426][ambient_generic] soda_empty_sound
Entity [1427][ambient_generic] soda_dispense_sound
Entity [1444][ambient_generic] lift_sound
Entity [1478][ambient_generic] lift_sound1
Entity [1530][ambient_generic]
Entity [1531][ambient_generic]
Entity [1532][ambient_generic] alarm1
Entity [1533][ambient_generic] alarm1
Entity [1622][ambient_generic]
Entity [1623][ambient_generic]
Entity [1678][ambient_generic] lift_sound2
Entity [1680][ambient_generic] rainsound
Entity [1681][ambient_generic] rainsound
Entity [1682][ambient_generic] rainsound1
Entity [1683][ambient_generic] rainsound1
Entity [1684][ambient_generic] br
Entity [1685][ambient_generic] br1
Entity [1686][ambient_generic] br2
Entity [1687][ambient_generic] br3
Entity [1688][ambient_generic] br4
Entity [1689][ambient_generic] br5
Entity [1690][ambient_generic] br6
Entity [1691][ambient_generic] br7
Entity [1692][ambient_generic] br8
Entity [1693][ambient_generic] br9
Entity [1694][ambient_generic] br10
Entity [1695][ambient_generic] dogs
Entity [1696][ambient_generic] frog
Entity [1697][ambient_generic] jang
Entity [1698][ambient_generic] jang1
Entity [1699][ambient_generic] jang3
Entity [1700][ambient_generic] truck
Entity [1701][ambient_generic] radio
Entity [1702][ambient_generic] radio1
Entity [1703][ambient_generic] airr
Entity [1704][ambient_generic] airr1
Entity [1705][ambient_generic] dsoundd
Entity [1706][ambient_generic] jails
I cannot reproduce ent_fire waterfallsound kill/stopsound/volume 0
not working with my custom map, using both .wav file and a sound script, in both single and multiplayer, which is why I am asking you to give me a map that has this issue, either make one or link me an existing map.
I can reproduce the rejoin server stuff, something to look into but it's quickly becoming quite difficult to find the source of the problem.
im sorry i missed that, i was sure that ambient has a name on gamebanana but seems like i added it later on. ill be home in 3 hrs and i hope i still have that map in trashbin. if not i will add it back for you to test it
again im sorry for the mistake heres the link for the right version of the map https://gofile.io/d/bg8ToB
when you spawn you hear sound of water, the entity name of the sound is waterfallsound try to stop it in multiplayer by any way with the following command ent_fire waterfallsound stopsound/ ent_fire waterfallsound kill/ ent_fire waterfallsound volume 0(in singleplayer it works perfect except for stopsound command i think)
the button that controls waterfall named "waterfallcontrol", its outputs keyvalues are stopsound with no delay and kill after delay of 3 secs, the command is ent_fire waterfallcontrol press
edit: if you already launch the map, i found another problem when i was building the map, flashlight on the trees to see them flicker, swaying trees lighting is broken
The inputs work perfectly fine, its the ent_fire
command that doesn't work on srcds.exe
thanks sorry for bothering you it does work but only whenever it wants to
hello, i know ambient_generic do obey in singleplayer (where i usually test maps) however when i launched it in multiplayer server i noticed ambient_generic dont obey any ent_fire commands, volume doesnt effect it, pitch/kill, or anything else when you try to do ent_fire stopsound, the sound gets bugged and you hear it all around the map on full volume. i ended up removing the sound completely from the map because i made an optional button with output to kill a looping sound of a waterfall, and whenever you press that button ambient_generic goes crazy
i know its problematic entity it always plays outside the distance you set it to and ALOT more problems valve offers a fix for that on wiki https://developer.valvesoftware.com/wiki/Ambient_generic
i just want to mention its not only keyvalues are broken, its everything from flags to inputs
usually im testing it with the following code to prevent turning on sv_cheats
timer.Create( "UniqueName2", 10, 0, function() for k, v in pairs(ents.FindByName("waterfallsound")) do v:Fire("volume 0") end end)