What are you working on?
You can achieve a much nicer looking flashlight in DP using cubemaps.
http://forums.inside3d.com/viewtopic.ph ... flashlight
The .skin float tells which cubemap to use, so 200 will need: cubemaps/200px.tga
In that file it should be entirely black then put a white spot in the middle. The white spot will be the flashlight.
http://forums.inside3d.com/viewtopic.ph ... flashlight
The .skin float tells which cubemap to use, so 200 will need: cubemaps/200px.tga
In that file it should be entirely black then put a white spot in the middle. The white spot will be the flashlight.
Cheers GiffE, have implemented. Its definitely smoother. Just tinkering with brightness, which is easy
cont: I've settled on 256 which makes things remain spooky
. Before I spend too long tinkering, failing, spotting an obvious mistake, tinkering some more, then eventually failing - is it theoretically possible to dynamically adjust the brightness, e.g. could I simulate failing batteries?
cont: I've settled on 256 which makes things remain spooky
So, is this how to do it:
- change this line
- then for every 120 of time, battery is reduced by 50
- it'll be increased to 512 when obtaining a battery pick up
it'll not be particularly realtime accurate, although i guess i can tinker with as i develop the game
- change this line
tonewflashlight.light_lev = 1024;
battery having a starting value of 512 (prob)newflashlight.light_lev = battery;
- then for every 120 of time, battery is reduced by 50
- it'll be increased to 512 when obtaining a battery pick up
it'll not be particularly realtime accurate, although i guess i can tinker with as i develop the game
http://www.youtube.com/watch?v=Gzqzp43ojz8
choppy towards end, may have better video later with more in it.
choppy towards end, may have better video later with more in it.
-
MeTcHsteekle
- Posts: 399
- Joined: Thu May 15, 2008 10:46 pm
- Location: its a secret
Sort of got my torch battery working. I haven't been able to get ti fading over time, bt I have got it 'running out', which is preventable if turned off, you know like a proper battery like!
Simple for some, but well tricky for me! All I got to do is now have a battery pick up to boost it, which should be simple, and have it have its own parm, to carry it thru' levels. Marvellous!
Simple for some, but well tricky for me! All I got to do is now have a battery pick up to boost it, which should be simple, and have it have its own parm, to carry it thru' levels. Marvellous!
Cool, something like that may work nicely with QuakeLife. For some reason I've been putting off coding in a flashlight which is quite odd given that it's a mod with half-life in mind. Unfortunately I don't exactly have DP at my disposal, as the HLBSP support is somewhat broken now. Some day though if LH fixes it up a better flashlight can be constructed in QC than valve's own code, I'm sure!ajay wrote:So, is this how to do it:
- change this linetonewflashlight.light_lev = 1024;battery having a starting value of 512 (prob)newflashlight.light_lev = battery;
- then for every 120 of time, battery is reduced by 50
- it'll be increased to 512 when obtaining a battery pick up
it'll not be particularly realtime accurate, although i guess i can tinker with as i develop the game
