Thriller light beam ? Plz help
Moderator: Moderators
-
[NER-BNL]Veteran
- Lance Corporal
- Posts: 14
- Joined: Mon Nov 22, 2004 1:20 pm
- Location: Gouda
Thriller light beam ? Plz help
Does anyone know how to make a light beam go on and off , like in those thriller movie.
// Scene is a dark hallway in a mental institution
Someone please help, or point me to a tut.
Greetz Veti (Mapping noob)
// Scene is a dark hallway in a mental institution
Someone please help, or point me to a tut.
Greetz Veti (Mapping noob)
---===[ Reality is a disillusion caused by a shortage of alcohol...!!! ]===---
give your light a key/value of
targetname/flickerLight
and put this into notepad
save it as the same name as your map with a .scr extension instead. (say your map's name is myMap.map, save this as myMap.scr) and put it with the map after you've compiled 
this is a pretty smple bit of code, hide makes it disappear, show makes it appear. it's a really cool effect though, when applied indoors.
mess with those wait values (wait 5) to get the light flickering just like you want it, i used those for an electric light in a dark garrison once. it had a cool effect in the building, but the model's shading looked awful, so use wisely.
targetname/flickerLight
and put this into notepad
Code: Select all
main:
// misc DM stuff and other junk that needs to be included
level waittill spawn
level.flickerThatLight = 1
thread flickeringLight
end
flickeringLight:
while(level.flickerThatLight == 1)
{
wait 15
$flickerLight hide
wait .3
$flickerLight show
wait 2
$flickerLight hide
wait .3
$flickerLight show
wait .5
$flickerLight hide
wait 5
$flickerlight hide
wait .5
$flickerLight show
}
end
this is a pretty smple bit of code, hide makes it disappear, show makes it appear. it's a really cool effect though, when applied indoors.
mess with those wait values (wait 5) to get the light flickering just like you want it, i used those for an electric light in a dark garrison once. it had a cool effect in the building, but the model's shading looked awful, so use wisely.
Moderator
۞
Abyssus pro sapientia
Olympus pro Ignarus
۞
AND STUFF™ © 2006
۞
Abyssus pro sapientia
Olympus pro Ignarus
۞
AND STUFF™ © 2006
I would recommend adding a corona to make it more realistic.
Then, I couldn't make a light entity hide or show ingame.
But:
u can add to ur map a script_origin and make it light in the script. This light though will be visible on the backsides of walls it shines on
If u don't care, then here we go:
Add a light bulb.
Add a script_origin where u want the light to be. Give it model : fx/dummy.tik and targetname : fx_light_01
Add another script_origin where u want the corona to be. Give it model : static/corona_reg.tik and targetname : fx_light_01 and imho scale : 0.5
In ur script something like
Here's this stuff (map+scr) in a zip
Dunno what the randomize parameters do (well, change the values, but how exactly) and I was too lazy to find out.
Then, I couldn't make a light entity hide or show ingame.
But:
u can add to ur map a script_origin and make it light in the script. This light though will be visible on the backsides of walls it shines on
If u don't care, then here we go:
Add a light bulb.
Add a script_origin where u want the light to be. Give it model : fx/dummy.tik and targetname : fx_light_01
Add another script_origin where u want the corona to be. Give it model : static/corona_reg.tik and targetname : fx_light_01 and imho scale : 0.5
In ur script something like
Code: Select all
main:
// misc DM stuff and other junk that needs to be included
level waittill spawn
thread flickeringLight
end
flickeringLight:
while(1)
{
wait (randomfloat 2)
$fx_light_01 light 1 1 1 (randomfloat 100+300)
$fx_corona_01 show
wait (randomfloat 2)
$fx_light_01 light 1 1 1 0 //R(0-1) G(0-1) B(0-1) Radius
$fx_corona_01 hide
}
endDunno what the randomize parameters do (well, change the values, but how exactly) and I was too lazy to find out.
Last edited by wacko on Mon Jan 17, 2005 3:58 pm, edited 1 time in total.
-
[NER-BNL]Veteran
- Lance Corporal
- Posts: 14
- Joined: Mon Nov 22, 2004 1:20 pm
- Location: Gouda
if I only knewElgan wrote:isnt (randomfloat 100+300) the same as (randomfloat 400):S
and flloat
But this is rather embarrassing, cauz prob there are more who know than who don't. All I know is that 'randomflow max' and 'randomint max' return a value between 0 and max and 'randomfloat a b' does something else
i guess that wud make sense. didnt know that you could set a min and a max using +:Sbdbodger wrote:(randomfloat 100 + 300) is every number between 300 and 399 , randomfloat 400 is every number between 0 and 399 and randomfloat (100 + 300) is the same as randomfloat 400 isn't it ?isnt (randomfloat 100+300) the same as (randomfloat 400):S
and flloat
sounds good, yes. thnx Bd
So:
randomint and randomfloat do the same but randomint can just handle integers?!
and
randomint (value) gives a result of between 0 and (value)
randomint (value) + anothervalue obviously (now
) a result between (0 + anothervalue) and (value + anothervalue). So it's not a special min and max parameter, but rather simple mathematics, like anynumber + 5 is more than 5 and less than anynumber + 6.
Any objections or coments?
So:
randomint and randomfloat do the same but randomint can just handle integers?!
and
randomint (value) gives a result of between 0 and (value)
randomint (value) + anothervalue obviously (now
Any objections or coments?
-
[NER-BNL]Veteran
- Lance Corporal
- Posts: 14
- Joined: Mon Nov 22, 2004 1:20 pm
- Location: Gouda
Tried the lightbeam tut.. made the texture, but it shows up as a black and blue squared texture... I'm i missing something or... i'm i just being blond again..?
Got a problem with the compiler also... When i compile it starts up mohaa, but console opens, and it reads CAN'T FIND LOCALISATION ENTRY... and COULDN"T LOAD thriller.bsp
(couldn't make a screenie , sinds i haven't got I-net at the moment
---===[ Reality is a disillusion caused by a shortage of alcohol...!!! ]===---
-
[NER-BNL]Veteran
- Lance Corporal
- Posts: 14
- Joined: Mon Nov 22, 2004 1:20 pm
- Location: Gouda
shader text was a copy past of your tut, and named the textures the same.. Just put it in my_textures instead of beam... but made only those changes in the text of the shader that reffered to ....\textures\beam
and yes it shows up in black/blue in radiant...
Can't test the map ... cause he can't find the .bsp of my map.... Mbuilder doesn't create it or something
and yes it shows up in black/blue in radiant...
Can't test the map ... cause he can't find the .bsp of my map.... Mbuilder doesn't create it or something
---===[ Reality is a disillusion caused by a shortage of alcohol...!!! ]===---
So, u're shader looks like:
The tga files are 24bit and in mohaa/main/textures/my_textures/beamdust.tga and mohaa/main/textures/my_textures/beamfade.tga
plz check this (typo?)
then 'bout mbuilder.
it does show the map in the map list (lower right)? Then it has found it. Open the 'other options' and check the 'Pause after...'. U will now be able to read what it did in e.g. the bsp stage. There's probably a leak in ur map u'd have to fix first.
Code: Select all
textures/my_textures/beamfade
{
qer_editorimage textures/my_textures/beamfade.tga
qer_keyword utility
qer_trans .4
surfaceparm nolightmap
surfaceparm nonsolid
surfaceparm trans
cull none
sort additive
{
map textures/my_textures/beamdust.tga
blendFunc add
tcMod scroll 0.05 0
tcMod scale 1 1
nextbundle
map textures/my_textures/beamfade.tga
}
}
plz check this (typo?)
then 'bout mbuilder.
it does show the map in the map list (lower right)? Then it has found it. Open the 'other options' and check the 'Pause after...'. U will now be able to read what it did in e.g. the bsp stage. There's probably a leak in ur map u'd have to fix first.
-
[NER-BNL]Veteran
- Lance Corporal
- Posts: 14
- Joined: Mon Nov 22, 2004 1:20 pm
- Location: Gouda
oke i'll check it... but even with the simple room it didn't work..
paths are set correctly...
Could it be that i got a soundfix from Wombat installed, my some of my sounds dissappeared after dl'ing a map... used the wombat soundfix to fix it..
paths are set correctly...
Could it be that i got a soundfix from Wombat installed, my some of my sounds dissappeared after dl'ing a map... used the wombat soundfix to fix it..
---===[ Reality is a disillusion caused by a shortage of alcohol...!!! ]===---
