Jump to content

Night Vision


Coralushi

Recommended Posts

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

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

 

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:

attachicon.gifhardatwork.png

help me to use this script plz

Link to comment
Share on other sites

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

Add

inst: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

Add

inst: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

Whenever I try to activate my character my game freezes after I hit "apply" this is how I have the coding put in :

xe2zi5F.png
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

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.

×
  • Create New...