• Lua water removal?
    16 replies, posted
I'm not asking for this to be made (but i am really) but if this is possible as it would be nice to know as i plan to learn lua and need a project. When you enter water, is it essentially a block of land that you can walk through and that paints a view of "underwater" on your screen. because if it is would it be possible to create a lua script that removes this and the water sound and the slowed down movement that you experience underwater. This would make submarines or underwater bases allot more enjoyable. Its not implementing water physics but its kind of like doing a hack-job to "delete" so to speak an area of water texture around the player.
Has already been tried before and sadly no-one suceeded.
It would require deleting a brush, and I don't think you can do that with a tool...
damn. I don't even know what a brush is... Is it an object created in hammer? also i have come up with an idea. have a custom built map with no water in it and create a lua script that creates an area that simulates water. then it should be a simple matter or deleting the water around you?
[quote=cherry gmod]create a lua script that creates an area that simulates water[/quote] That is not simple matter.
[QUOTE=cherry gmod;19634127]damn. I don't even know what a brush is... Is it an object created in hammer? also i have come up with an idea. have a custom built map with no water in it and create a lua script that creates an area that simulates water. then it should be a simple matter or deleting the water around you?[/QUOTE] If you were able to do that, you would be the first one to solve the water in source engine problem. Thing is, it is not possible to delete brushes in garrysmod, let stand move about water alone, which can only be done in hammer. A brush, is an object created in hammer yes, everything you see in a map such as hills, buildings and such are made out of brushes, unless it's a prop ofc.
Damn it. thought i was onto something.
The simulated water idea, instead of actually having any water brushes in the map, might actually work. However, it would most likely be forced to using cheap water instead of the standard water shaders, if it even works with the standard textures at all - someone with good vmt (material file) scripting experience could make some fake materials easily enough though, I think. The biggest problem, I think, is figuring out where to clip the simulated water around you. It'd be hard to detect the "interior" of a submarine, let alone shape the removal of the water right.
[QUOTE=Skyhawk;19636956]The simulated water idea, instead of actually having any water brushes in the map, might actually work. However, it would most likely be forced to using cheap water instead of the standard water shaders, if it even works with the standard textures at all - someone with good vmt (material file) scripting experience could make some fake materials easily enough though, I think. The biggest problem, I think, is figuring out where to clip the simulated water around you. It'd be hard to detect the "interior" of a submarine, let alone shape the removal of the water right.[/QUOTE] You can set the air density to a player higher and set their gravity lower, that should simulate a water like environment, after that you can apply force to a player when space/ctrl is pressed, add a screen overlay and you got simulated water (If i am not forgetting something).
[QUOTE=F_Synchro;19636448]Thing is, it is not possible to delete brushes in garrysmod, let stand move about water alone, which can only be done in hammer.[/QUOTE] Afaik it could be. One time while having tracer wars with Chrisaster, (The tracer removing the entity it hit) via rcon, he accidentally deleted the world. Deleting a single brush might be impossible though. [editline]10:56PM[/editline] [QUOTE=Kialtia;19648041]You can set the air density[/QUOTE] :iiam:
[QUOTE=|FlapJack|;19650833]:iiam:[/QUOTE] [URL="http://wiki.garrysmod.com/?title=PhysObj.SetDamping"]PhysObj.SetDamping[/URL] :ms:
'Fraid players aren't physobjs bro.
[QUOTE=|FlapJack|;19652771]'Fraid players aren't physobjs bro.[/QUOTE] But they DO have physobjects.
[code]01:02:20 > print(player.GetByID(2) , player.GetByID(2):GetPhysicsObject())... Player [2][Devil Kirby [CP-Sandvich]]<TAB>PhysObject[/code] I didn't expect that.
If only there was a way to make water stay out of props :(
[QUOTE=alexojm;19662736]If only there was a way to make water stay out of props :([/QUOTE] Assuming we have made custom water we can remove water from inside square props.
Well, after Flapjack tested what i said, im pretty sure its possible kinda, if you want to remove all Water parts from a map, you could get a table of textures and look for Func brushes with that texture.
Sorry, you need to Log In to post a reply to this thread.