Lightsource issue

Talk about creating Grimrock 1 levels and mods here. Warning: forum contains spoilers!
User avatar
Leki
Posts: 550
Joined: Wed Sep 12, 2012 3:49 pm

Lightsource issue

Post by Leki »

Hi .
Is there a way to create "non fading" lightsource? I mean stable source of light without "pulse effect".
I'm the Gate I'm the Key.
Dawn of Lore
User avatar
Komag
Posts: 3659
Joined: Sat Jul 28, 2012 4:55 pm
Location: Boston, USA

Re: Lightsource issue

Post by Komag »

You can just set the life to be crazy high, like a million seconds
Finished Dungeons - complete mods to play
User avatar
Neikun
Posts: 2457
Joined: Thu Sep 13, 2012 1:06 pm
Location: New Brunswick, Canada
Contact:

Re: Lightsource issue

Post by Neikun »

I wonder if the same could be achieved if the life is set to zero?
"I'm okay with being referred to as a goddess."
Community Model Request Thread
See what I'm working on right now: Neikun's Workshop
Lead Coordinator for Legends of the Northern Realms Project
  • Message me to join in!
Lmaoboat
Posts: 359
Joined: Wed Apr 11, 2012 8:55 pm

Re: Lightsource issue

Post by Lmaoboat »

Neikun wrote:I wonder if the same could be achieved if the life is set to zero?
That just makes no light at all, and kills any existing light. However, the light still counts as existing in terms of scripting, so creating a light, setting it's duration to 0 to get rid of it, and creating it again will cause an error if not spaced apart, which as really annoying until we got :destroy().
Lmaoboat
Posts: 359
Joined: Wed Apr 11, 2012 8:55 pm

Re: Lightsource issue

Post by Lmaoboat »

Also, you can make a fade-in effect by using an "anti-light" who's fade out makes it cancel out less and less of the actual light.

Code: Select all

spawn("timer", self.level, self.x, self.y, self.facing, self.id.."time")
:setTimerInterval(2.1)
:addConnector("activate", self.id, "pulse")
:activate()

function pulse()
		spawn("fx", self.level, self.x, self.y, self.facing, self.id.."light2")
		:setLight(-1,-1,-1,10,5,1,true)
		:translate(0,1,0)
		spawn("fx", self.level, self.x, self.y, self.facing, self.id.."light1")
		:setLight(1,1,1,10,5,2,true)
		:translate(0,1,0)
end
Szragodesca
Posts: 59
Joined: Sun Oct 14, 2012 7:13 am

Re: Lightsource issue

Post by Szragodesca »

Lmaoboat wrote:Also, you can make a fade-in effect by using an "anti-light" who's fade out makes it cancel out less and less of the actual light.
SpoilerShow

Code: Select all

spawn("timer", self.level, self.x, self.y, self.facing, self.id.."time")
:setTimerInterval(2.1)
:addConnector("activate", self.id, "pulse")
:activate()

function pulse()
		spawn("fx", self.level, self.x, self.y, self.facing, self.id.."light2")
		:setLight(-1,-1,-1,10,5,1,true)
		:translate(0,1,0)
		spawn("fx", self.level, self.x, self.y, self.facing, self.id.."light1")
		:setLight(1,1,1,10,5,2,true)
		:translate(0,1,0)
end
Does that have the same grainy effect as the negative light value I tested in the slimes thread? If not, it may be closer to what I was going for with the dark slime anti-light (although it wasn't meant to pulse). I can't test it for myself, since I'm off to work, but if it could be tied to a mob to cause a moving unlight aura, that would be wicked. :twisted:
User avatar
Leki
Posts: 550
Joined: Wed Sep 12, 2012 3:49 pm

Re: Lightsource issue

Post by Leki »

I am sorry, maybe I asked in wrong way. :oops:
I would like to create a lightsource with constant intensity. Each light in Grimrock is "pulsating": torch, ceiling lamp, light spell etc. I want lightsource without this effect if it's possible. I am missing "pulsating" boolean in light entity - maybe creating of this kind of light is not possible. :cry:
I'm the Gate I'm the Key.
Dawn of Lore
Szragodesca
Posts: 59
Joined: Sun Oct 14, 2012 7:13 am

Re: Lightsource issue

Post by Szragodesca »

Basically, you want a lightbulb, not a torch. Consistent, even glow as opposed to flicker.

I could definitely see a use for that in some Dungeon (metal) themed dungeons. I don't doubt someone will try to modernize LoG in a map or 2, and some magelights would be consistent as well (better for reading tomes). :)
User avatar
Leki
Posts: 550
Joined: Wed Sep 12, 2012 3:49 pm

Re: Lightsource issue

Post by Leki »

Szragodesca wrote:Basically, you want a lightbulb, not a torch. Consistent, even glow as opposed to flicker.

I could definitely see a use for that in some Dungeon (metal) themed dungeons. I don't doubt someone will try to modernize LoG in a map or 2, and some magelights would be consistent as well (better for reading tomes). :)
... or sunlight for outdoor scene?
I'm the Gate I'm the Key.
Dawn of Lore
Lmaoboat
Posts: 359
Joined: Wed Apr 11, 2012 8:55 pm

Re: Lightsource issue

Post by Lmaoboat »

Leki wrote:I am sorry, maybe I asked in wrong way. :oops:
I would like to create a lightsource with constant intensity. Each light in Grimrock is "pulsating": torch, ceiling lamp, light spell etc. I want lightsource without this effect if it's possible. I am missing "pulsating" boolean in light entity - maybe creating of this kind of light is not possible. :cry:
Oh, that's easy, just create an FX entity and use FX:setLight(red, green, blue, brightness, range, time, castShadow)
Post Reply