IgorBgz90 Posted February 21, 2015 Share Posted February 21, 2015 Please add in the next update - opportunity to get a type from the file material. I think it will be very comfortable and functional. You can make a return type int... int Material::GetType(); //Returns the type of material "Metal, Concrete, Wood, Water, Flesh, Grass etc.." Example of use: --FPSPlayer Footsteps Get type function Script:Collision(entity,position,normal,speed) if speed>20 then self:Hurt(100) end if entity:GetMaterial():GetType() ~! nil then if entity:GetMaterial():GetType() == Material:Type:Concrete then self.sound.footsteps.type = 1 end if entity:GetMaterial():GetType() == Material:Type:Metal then self.sound.footsteps.type = 2 end --etc end end Useful for the sound of footsteps, traces of bullets, particles etc. 2 Quote Link to comment Share on other sites More sharing options...
Rick Posted February 21, 2015 Share Posted February 21, 2015 Please add in the next update Bold request I think you'd need a SetType() as well and then add a way to do this via the material editor. 1 Quote Link to comment Share on other sites More sharing options...
IgorBgz90 Posted February 21, 2015 Author Share Posted February 21, 2015 Bold request I think you'd need a SetType() as well and then add a way to do this via the material editor. Yes Rick I liked this implementation still in GoldSrc... Checking collision bullets, we can get the type of material object. And then draw the correct decals and particles. Quote Link to comment Share on other sites More sharing options...
AnthonyPython Posted February 21, 2015 Share Posted February 21, 2015 Bold request I think you'd need a SetType() as well and then add a way to do this via the material editor. +1 this would make this stuff to deal with much easier Yes Rick I liked this implementation still in GoldSrc... Checking collision bullets, we can get the type of material object. And then draw the correct decals and particles. valve's source engine's period has had this and would be awesome to have 1 Quote OS: Windows 10 Pro CPU: i3-10100 CPU @ 3.60GHz GPU: NVIDIA 2060 Super - 8 GB RAM: 32 GB Link to comment Share on other sites More sharing options...
awgsknite Posted February 21, 2015 Share Posted February 21, 2015 +1 Who wants to hear boots clomping on concrete as the player walks through water ? and why would you want to hear boots clomping on concrete as you walk on gravel or snow, etc.. ? Is there a way to do this already ? 'cos i have not played with sounds yet with LE Quote http://steamcommunity.com/profiles/76561197977392956/7977392956/ Link to comment Share on other sites More sharing options...
AnthonyPython Posted February 21, 2015 Share Posted February 21, 2015 +1 Who wants to hear boots clomping on concrete as the player walks through water ? and why would you want to hear boots clomping on concrete as you walk on gravel or snow, etc.. ? Is there a way to do this already ? 'cos i have not played with sounds yet with LE +9,001 Quote OS: Windows 10 Pro CPU: i3-10100 CPU @ 3.60GHz GPU: NVIDIA 2060 Super - 8 GB RAM: 32 GB Link to comment Share on other sites More sharing options...
IgorBgz90 Posted February 21, 2015 Author Share Posted February 21, 2015 +1 Who wants to hear boots clomping on concrete as the player walks through water ? and why would you want to hear boots clomping on concrete as you walk on gravel or snow, etc.. ? Is there a way to do this already ? 'cos i have not played with sounds yet with LE Sound is very important, and not only for the sound can be used. Correct decals, particles... Quote Link to comment Share on other sites More sharing options...
AnthonyPython Posted February 21, 2015 Share Posted February 21, 2015 Sound is very important, and not only for the sound can be used. Correct decals, particles... or telling a monster that if it walks on a texture of hot coal's then set it on fire and burn to death as well or lava or what ever you prefer 1 Quote OS: Windows 10 Pro CPU: i3-10100 CPU @ 3.60GHz GPU: NVIDIA 2060 Super - 8 GB RAM: 32 GB Link to comment Share on other sites More sharing options...
Einlander Posted February 21, 2015 Share Posted February 21, 2015 This would work awesome for traditional games and csg's, but issues will arise when you get creative. So lets say I create a portal clone. I create a new goo. How do I assign a new material type? Another issue is multi-material meshes. Say I import 1 house and it is a single mesh with multiple materials. How do I figure out the footsteps WITHOUT creating triggerzones to force the structure ts to change? Same thing with a mesh that uses a texture atlas. Quote Link to comment Share on other sites More sharing options...
AnthonyPython Posted February 21, 2015 Share Posted February 21, 2015 This would work awesome for traditional games and csg's, but issues will arise when you get creative. So lets say I create a portal clone. I create a new goo. How do I assign a new material type? Another issue is multi-material meshes. Say I import 1 house and it is a single mesh with multiple materials. How do I figure out the footsteps WITHOUT creating triggerzones to force the structure ts to change? Same thing with a mesh that uses a texture atlas. work-around's like have a default setting, etc. Quote OS: Windows 10 Pro CPU: i3-10100 CPU @ 3.60GHz GPU: NVIDIA 2060 Super - 8 GB RAM: 32 GB Link to comment Share on other sites More sharing options...
Crazycarpet Posted February 21, 2015 Share Posted February 21, 2015 +1 for sure. Quote Link to comment Share on other sites More sharing options...
josk Posted February 21, 2015 Share Posted February 21, 2015 +1 Quote Elite Cobra Squad Link to comment Share on other sites More sharing options...
shadmar Posted February 21, 2015 Share Posted February 21, 2015 Nice request, +1, but can't you just build a table of materials with corresponding sounds, then use Pick()->GetSurface()->GetMaterial(), compare against table and set the appropriate sound ? (haven't tested this was all in theory) Quote HP Omen - 16GB - i7 - Nvidia GTX 1060 6GB Link to comment Share on other sites More sharing options...
Olby Posted February 21, 2015 Share Posted February 21, 2015 Nice request, +1, but can't you just build a table of materials with corresponding sounds, then use Pick()->GetSurface()->GetMaterial(), compare against table and set the appropriate sound ? (haven't tested this was all in theory) Indeed, its already possible via Asset::GetPath. Just name your materials with type prefix e.g. dirt_brown1.mat, conc_clean2.mat or wood_lines32.mat. When picking the ground underneath the player just get the material path and extract first four letters and match them up to internal/external sound list/material properties. Quote Intel Core i7 Quad 2.3 Ghz, 8GB RAM, GeForce GT 630M 2GB, Windows 10 (x64) Link to comment Share on other sites More sharing options...
YouGroove Posted February 21, 2015 Share Posted February 21, 2015 +1 Indeed, its already possible via Asset::GetPath. Just name your materials with type prefix e.g. dirt_brown1.mat, conc_clean2.mat or wood_lines32.mat. When picking the ground underneath the player just get the material path and extract first four letters and match them up to internal/external sound list/material properties. No workarounds like old animation system. A simple easy and direct workflow is always better and you get lot more productive making your game faster and not loosing time with workarounds. Quote Stop toying and make games Link to comment Share on other sites More sharing options...
Olby Posted February 21, 2015 Share Posted February 21, 2015 I know, but people tend wait for these enhancements not realising its already possible. Most of game development is about programming so you would still have to do some coding one way or another. Having only basic type of material will not give you much flexibility. It needs to be a more thorough with physical material properties. 2 Quote Intel Core i7 Quad 2.3 Ghz, 8GB RAM, GeForce GT 630M 2GB, Windows 10 (x64) Link to comment Share on other sites More sharing options...
Rick Posted February 21, 2015 Share Posted February 21, 2015 It would have to be tested with terrain. Not sure if you can get the mix of textures that the terrain allows. That's probably the biggest use case for foot step sounds honestly. Quote Link to comment Share on other sites More sharing options...
awgsknite Posted February 24, 2015 Share Posted February 24, 2015 if it get's implemented then insert tap dance here 1 Quote http://steamcommunity.com/profiles/76561197977392956/7977392956/ Link to comment Share on other sites More sharing options...
IgorBgz90 Posted February 24, 2015 Author Share Posted February 24, 2015 if it get's implemented then insert tap dance here Looking forward Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.