Exovillex Posted March 31, 2020 Share Posted March 31, 2020 I'm trying to add a Night Vision script to a mod character I use regularly called "Yoliner" This of course is for my own personal use, however I wanted to know what I could be missing as this is the component I added to it local function nightvision(inst, phase) if phase == "day" then inst.components.playervision:ForceNightVision(false) elseif phase == "dusk" then inst.components.playervision:ForceNightVision(false) elseif phase == "night" then inst.components.playervision:ForceNightVision(true) inst.components.playervision:SetCustomCCTable(nil) end end Link to comment https://forums.kleientertainment.com/forums/topic/116919-adding-night-vision/ Share on other sites More sharing options...
Exovillex Posted March 31, 2020 Author Share Posted March 31, 2020 (edited) 20 hours ago, Exovillex said: I'm trying to add a Night Vision script to a mod character I use regularly called "Yoliner" This of course is for my own personal use, however I wanted to know what I could be missing as this is the component I added to it local function nightvision(inst, phase) if phase == "day" then inst.components.playervision:ForceNightVision(false) elseif phase == "dusk" then inst.components.playervision:ForceNightVision(false) elseif phase == "night" then inst.components.playervision:ForceNightVision(true) inst.components.playervision:SetCustomCCTable("images/colour_cubes/beaver_vision_cc.tex") inst.components.playervision:SetCustomCCTable(nil) end end Made some corrections to my original post, as well as spaced it to make it a bit easier to read I've continued to experiment, and looked and compared to other mods and instances of nightvision and I can't quite figure out what is missing in the script that allows it to activate. Even when compared to older versions of this same mode Update: Nvm I figured it out Edited April 1, 2020 by Exovillex Link to comment https://forums.kleientertainment.com/forums/topic/116919-adding-night-vision/#findComment-1320788 Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now