Jump to content

Recommended Posts

Hello, I´m attempting to make character that have nightvision only when he needs it e.g. only in total darkness, but I Run into an issue. When he enter darkness screen starts flashing. I guess that is because nightvision counts as light (who would thought that). Is there any way how to make it react only to natural light?

inst:ListenForEvent("enterdark", 
        function() 
        GetClock():SetNightVision(true)
       	GetWorld().components.colourcubemanager:SetOverrideColourCube("images/colour_cubes/mole_vision_on_cc.tex", 2)
        end)

    	inst:ListenForEvent("enterlight", 
             function() 
             GetClock():SetNightVision(false)
             GetWorld().components.colourcubemanager:SetOverrideColourCube(nil, .5)
        end)
	

 

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
  • Create New...