Coralushi Posted September 12, 2013 Share Posted September 12, 2013 Hello there I have a simple question.What code do you use to give your character night vision? Link to comment Share on other sites More sharing options...
TheDanaAddams Posted September 13, 2013 Share Posted September 13, 2013 Cut straight from the Dark Link mod: -- Night-vision inst.entity:AddLight() inst.Light:Enable(true) inst.Light:SetRadius(40) inst.Light:SetFalloff(.5) inst.Light:SetIntensity(0.9) inst.Light:SetColour(245/255,255/255,245/255) Link to comment Share on other sites More sharing options...
Coralushi Posted September 13, 2013 Author Share Posted September 13, 2013 Thank you for helping me I really LOVE your Dark link mod.I hope I will become such a great modder as your are. Link to comment Share on other sites More sharing options...
TheDanaAddams Posted September 13, 2013 Share Posted September 13, 2013 Oh, gosh, no, I'm just a terrible hack.I barely know a thing about programming. I just dig through existing code with a pair of safety scissors, and glue the bits I need together. Actual photo of me working on a mod: Link to comment Share on other sites More sharing options...
Armentia Posted September 13, 2013 Share Posted September 13, 2013 Oh, gosh, no, I'm just a terrible hack.I barely know a thing about programming. I just dig through existing code with a pair of safety scissors, and glue the bits I need together. Welcome to the world of programming. Link to comment Share on other sites More sharing options...
Coralushi Posted September 13, 2013 Author Share Posted September 13, 2013 Haha still I love your Dark Link. It looks beautiful I'm playing with it sometimes and I really like the art. I tried digging through code too..But it was standing False where it should stand true.So that's why it didn't work I guess Haha I love that illustration btw. Link to comment Share on other sites More sharing options...
simplex Posted September 14, 2013 Share Posted September 14, 2013 Oh, gosh, no, I'm just a terrible hack. I barely know a thing about programming. I just dig through existing code with a pair of safety scissors, and glue the bits I need together. Well, at least you know where to cut, and use high quality glue. ;] Link to comment Share on other sites More sharing options...
ahduyabduawbduawbduawdb Posted April 9, 2014 Share Posted April 9, 2014 Cut straight from the Dark Link mod:-- Night-vision inst.entity:AddLight() inst.Light:Enable(true) inst.Light:SetRadius(40) inst.Light:SetFalloff(.5) inst.Light:SetIntensity(0.9) inst.Light:SetColour(245/255,255/255,245/255)pl Oh, gosh, no, I'm just a terrible hack.I barely know a thing about programming. I just dig through existing code with a pair of safety scissors, and glue the bits I need together. Actual photo of me working on a mod:hardatwork.pnghelp me to use this script plz Link to comment Share on other sites More sharing options...
Domo Posted May 8, 2014 Share Posted May 8, 2014 Night vision sounds like a great idea Link to comment Share on other sites More sharing options...
Menaria Posted July 7, 2014 Share Posted July 7, 2014 Hey, thanks so much for that code! This is just what I need.But I noticed a problem. Whenever a lighting hits my custom character, the "night vision" dissapears. Anybody knows how to deal with it?The code I use:-- Night-vision inst.entity:AddLight() inst.Light:Enable(true) inst.Light:SetRadius(40) inst.Light:SetFalloff(.5) inst.Light:SetIntensity(0.9) inst.Light:SetColour(245/255,255/255,245/255) Also dunno if I should open a new discussion for it (forgive me padre if I should), but I wonder if there's a way to make the "night vision" slowly appear when the night starts, instead of making the character look like a bulb during the day. I'll patiently wait for the replies and apreciate any help. Link to comment Share on other sites More sharing options...
Mobbstar Posted July 7, 2014 Share Posted July 7, 2014 Addinst:ListenForEvent( "nighttime", function() [THE NIGHTVISION CODE HERE] end, GetWorld() )and use the same method for deactivating it during the day. You may be able to do the same for your lightning problem. Link to comment Share on other sites More sharing options...
Menaria Posted July 7, 2014 Share Posted July 7, 2014 Addinst:ListenForEvent( "nighttime", function() [THE NIGHTVISION CODE HERE] end, GetWorld() )and use the same method for deactivating it during the day. You may be able to do the same for your lightning problem.Oh my God it's working! You have no idea how grateful I am. Thanks!! Link to comment Share on other sites More sharing options...
Mobbstar Posted July 7, 2014 Share Posted July 7, 2014 Oh my God it's working! You have no idea how grateful I am. Thanks!! No problem! To be fair, I am only doing this: http://forums.kleientertainment.com/topic/27642-night-vision/#entry320334 Link to comment Share on other sites More sharing options...
implendoratio Posted January 1, 2016 Share Posted January 1, 2016 Whenever I try to activate my character my game freezes after I hit "apply" this is how I have the coding put in :It is in the .lua in the prefabs folder within the scripts folder, I don't know why it isn't working, and just as a second note, my game DOESN'T crash while the Night Vision code ISN'T there Link to comment Share on other sites More sharing options...
implendoratio Posted January 1, 2016 Share Posted January 1, 2016 Also what do I need to do to turn off the night-vision during the day, I have NO idea how to code ._. Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.
Please be aware that the content of this thread may be outdated and no longer applicable.