First thing i want to say, is no, This is not some wierd "Shoot" Then "Slow Motion Death Sequence" gun, This is just a small project to do because i was bored, and it "MIGHT" Be usefull in machinimas that use host_timescale for slow motion.
What it does is, read the players Convar of host_timescale, and pitch the weapon sounds via what it is.
Example:
host_timescale = 0.5
Pitch = 50
host_timescale = 0.2
Pitch = 20
So on so forth, it even works Sped up aswell up to about 2.5 host timescale i think.
This isnt really release worthy, but i just thought i would share it with anyone who likes to use slow motion and have the feel of it.
Download:
[url=http://www.garrysmod.org/downloads/?a=view&id=89197][img]http://www.garrysmod.org/img/?t=dll&id=89197[/img][/url]
Yeah it has a custom model sorry, I just liked the looks and feel of it. :3:
[media]http://www.youtube.com/watch?v=jAfwZSWVJkg[/media]
Could be useful, any chance you can make a script that does it TO ALL SOUNDS?
[QUOTE=loled;19801273]Could be useful, any chance you can make a script that does it TO ALL SOUNDS?[/QUOTE]
I would love to, but i dont know if theres a function or hook where all the sounds get proccessed.
[QUOTE=Wizey!;19801627]I would love to, but i dont know if theres a function or hook where all the sounds get proccessed.[/QUOTE]
I know that SMOD did it, so it should be possible, somehow...
[QUOTE=Dlaor;19801983]I know that SMOD did it, so it should be possible, somehow...[/QUOTE]
Smod used C++ Though, But yeah, if i knew a function where all the Emit Sounds and sounds where proccessed, i could just add the little timescale*100 into the pitch of them.
Great.
[QUOTE=Wizey!;19800853]First thing i want to say, is no, This is not some wierd "Shoot" Then "Slow Motion Death Sequence" gun, This is just a small project to do because i was bored, and it "MIGHT" Be usefull in machinimas that use host_timescale for slow motion.
What it does is, read the players Convar of host_timescale, and pitch the weapon sounds via what it is.
Example:
host_timescale = 0.5
Pitch = 50
host_timescale = 0.2
Pitch = 20
So on so forth, it even works Sped up aswell up to about 2.5 host timescale i think.
This isnt really release worthy, but i just thought i would share it with anyone who likes to use slow motion and have the feel of it.
Download:
[url=http://www.garrysmod.org/downloads/?a=view&id=89197][img]http://www.garrysmod.org/img/?t=dll&id=89197[/img][/url]
Yeah it has a custom model sorry, I just liked the looks and feel of it. :3:
[media]http://www.youtube.com/watch?v=jAfwZSWVJkg[/media][/QUOTE]
In your spare time,do you think you can make the same thing,but replace the model with a CSS Deagle and replace it with this sound, [url]http://www.fpsbanana.com/sounds/10181[/url] Please!
really, this is getting old, mods need to ban those who bump like this
[QUOTE=Wizey!;19801627]I would love to, but i dont know if theres a function or hook where all the sounds get proccessed.[/QUOTE]
[lua]local meta = FindMetaTable( "Entity" )
if !meta then
return
end
if !meta.EmitSoundOld then
meta.EmitSoundOld = meta.EmitSound
end
meta.EmitSound = function( self, snd, slvl, sp )
local timescale = GetConVarNumber("host_timescale")
self:EmitSoundOld( snd, slvl, timescale*sp )
end[/lua]
Old bump receives new content.
[QUOTE=blackops7799;20691740][lua]local meta = FindMetaTable( "Entity" )
if !meta then
return
end
if !meta.EmitSoundOld then
meta.EmitSoundOld = meta.EmitSound
end
meta.EmitSound = function( self, snd, slvl, sp )
local timescale = GetConVarNumber("host_timescale")
self:EmitSoundOld( snd, slvl, timescale*sp )
end[/lua]
Old bump receives new content.[/QUOTE]
Oh Snap...
Even though in my tests it does nothing :3:
[QUOTE=blackops7799;20691740][lua]local meta = FindMetaTable( "Entity" )
if !meta then
return
end
if !meta.EmitSoundOld then
meta.EmitSoundOld = meta.EmitSound
end
meta.EmitSound = function( self, snd, slvl, sp )
local timescale = GetConVarNumber("host_timescale")
self:EmitSoundOld( snd, slvl, timescale*sp )
end[/lua]
Old bump receives new content.[/QUOTE]
Does that work?
[QUOTE=Wombo194;20692783]Does that work?[/QUOTE]
[QUOTE=Wizey!;20691893]Oh Snap...
Even though in my tests it does nothing :3:[/QUOTE]
It works fine for me. I did fix it to stop erroring on some occasions though.
[lua]local meta = FindMetaTable( "Entity" )
if !meta then
return
end
if !meta.EmitSoundOld then
meta.EmitSoundOld = meta.EmitSound
end
meta.EmitSound = function( self, snd, slvl, sp )
sp = sp or 100
slvl = slvl or 100
local timescale = GetConVar("host_timescale"):GetFloat()
self:EmitSoundOld( snd, slvl, timescale*sp )
end[/lua]
The M9 Model is sweet and sexy
[QUOTE=Wombo194;20692783]Does that work?[/QUOTE]
It works, but only on entities that emit sound via [b][url=http://wiki.garrysmod.com/?title=Entity.EmitSound]Entity.EmitSound [img]http://wiki.garrysmod.com/favicon.ico[/img][/url][/b]. So this wouldn't work with weapons.
[QUOTE=Wombo194;20691502]really, this is getting old, mods need to ban those who bump like this[/QUOTE]
What the fuck? This isn't even three months old. It's not old, it's new, and you're an idiot.
Now THAT's called "animation". Awesome animations, I doubt you made them but that's not the main point. Now if you just added physical bullets...
It's not showing up in my Weapons tab, what am I doing wrong?
[QUOTE=Wizey!;19802023]Smod used C++ Though, But yeah, if i knew a function where all the Emit Sounds and sounds where proccessed, i could just add the little timescale*100 into the pitch of them.[/QUOTE]
Smod infact does not use C++ completely, I checked, it uses LUA as well.
Here's the directory of the LUA C:\Program Files\Steam\steamapps\SourceMods\smod\cfg . It basically does all the exec commands.
Sorry, you need to Log In to post a reply to this thread.