• env_fog_controller question
    7 replies, posted
Hello! I have script which restrict view distance, but on some maps it doesn't work. Display only fog without restrict. Why is this happening? What is the reason for this? Restrict view distance work https://files.facepunch.com/forum/upload/111131/ca9e1647-9ecf-463c-8314-a03dddc5c064/20180610195410_1.jpg https://files.facepunch.com/forum/upload/111131/bfd83bcd-be1c-4eb4-addf-ff7826f6c938/20180610195351_1.jpg https://files.facepunch.com/forum/upload/111131/a7b3ea6c-3d7a-44a8-a460-883f4e7eb74d/20180610195233_1.jpg https://files.facepunch.com/forum/upload/111131/4c3e9aee-3e4e-4b8b-99aa-7676b58c7eaf/20180610195225_1.jpg Restrict view distance don't work https://files.facepunch.com/forum/upload/111131/af507fb6-e726-40d6-b301-b4c207c22fbd/20180610195525_1.jpg https://files.facepunch.com/forum/upload/111131/e4f36172-ad7f-47ec-9436-a05b49d81817/20180610195601_1.jpg
On the map with the tunnels I am fairly sure the map making uses a technique where it is actually an image that is being rendered not the map and as you walk through it, it fades into the actual map. As for gm_construct I am not sure.
I still have not found a solution to the problem
the entity has a keyvalue called "farz" anything beyond is culled from rendering
I have this code   local function init()     local FogController = nil       for k, v in pairs( ents.FindByClass( "env_fog_controller" ) ) do       v:SetKeyValue( "fogend", 2000 )       v:SetKeyValue( "fogstart", 500 )       v:SetKeyValue( "farz", 2000 )       FogController = v[1] // or should I overall it????     end       if not FogController then       local fog = ents.Create( "env_fog_controller" )       fog:SetKeyValue( "fogend", 2000 )       fog:SetKeyValue( "fogstart", 500 )       fog:SetKeyValue( "farz", 2000 )       FogController = fog     end       --FogController = nil       concommand.Add( "fog_changesize", function( ply, args, cmd )       FogController:SetKeyValue( "farz", args )     end )       function doMapHiding( dist )       FogController:SetKeyValue( "farz", dist )     end       /*local Extended = {       [amount] = howmuch     }*/       DrawDist = DrawDist or {}       DrawDist.ShouldCountPlayers = false     DrawDist.DefaultDistation = 2000     if DrawDist.ShouldCountPlayers then       if #player.GetAll() < 40 then         DrawDist.DefaultDistation = 2000       elseif #player.GetAll() > 80 then         DrawDist.DefaultDistation = 1000       elseif #player.GetAll() > 40 and #player.GetAll() < 80 then         DrawDist.DefaultDistation = math.random( 1000, 2000 )       end     end     doMapHiding( DrawDist.DefaultDistation )     end   hook.Add( "Initialize", "drawdistance", init )
are you in hammer? use hammer to place the env_fog_controller
Can I do it without hammer?
Try adding this in. v:SetKeyValue( "fogenable", true ) Reading here env_fog_controller it says its defaulted to false.
Sorry, you need to Log In to post a reply to this thread.