Pulsing lights..

If you're looking for mapping help or you reckon you're a mapping guru, post your questions / solutions here

Moderator: Moderators

User avatar
wacko
Field Marshal
Posts: 2085
Joined: Fri Jul 05, 2002 8:42 pm
Location: Germany

Post by wacko »

made an update to the last post.
:oops: hopefully it won't get more confusing
Franaticus Satanii
Colour Sergeant
Posts: 84
Joined: Tue Aug 19, 2003 5:38 pm
Location: Florida, USA

Post by Franaticus Satanii »

Thanks wacko. You didn't create a mess, actually you have been quite helpful!

It is good to see everyone's perspective on a subject when you are learning like me.

Thanks. Will give it another go.
Murphy's Law:
It is impossible to make anything foolproof because fools are so ingenious.
nuggets
General
Posts: 1006
Joined: Fri Feb 28, 2003 2:57 am
Location: U-england-K (england in the UK) :P
Contact:

Post by nuggets »

ok sorry 1st of all for taking so long to read this thread and 2ndly sorry to Wacko for changing the method but

create a brush
change to script_object
press n with the brush selected
then enter
key: model
value: fx/dummy.tik
key: targetname
value: pulsating_light

then in script

main:
thread pulsating_light 30
end

pulsating_light local.light:
$pulsating_light light 1 0 0 30 //1 0 0 30 repesent red green blue range
$pulsating_light thread dim_me local.light
end

dim_me local.light:
self light 1 0 0 local.light
wait .2
if (local.light > 30)
{local.light = local.light - 5
self thread dim_me local.light}
else
{self thread light_me local.light}
end

light_me local.light:
self light 1 0 0 local.light
wait .2
if (local.light < 100)
{local.light = local.light + 5
self thread light_me local.light}
else
{self thread dim_me local.light}
end

/*change the values of 30 and 100 if the light is too bright or too dim
and change the wait .2 value to greater numbers if the increment time is to slow
*/
hope this helps, prob not cos it's all foreign 2 me :-/
User avatar
wacko
Field Marshal
Posts: 2085
Joined: Fri Jul 05, 2002 8:42 pm
Location: Germany

Post by wacko »

nuggets, u don't have to be sorry!!!
Especially, because your script can't do what my model does: It still makes an invisible light (like tltrude said). If it's hovering in the air without some brushes around, you won't see anything. Instead, yours can light up near brushfaces but
Heydrich wrote:(that he doesn't)...need this light to actually produce lighting...just to give the appearance of pulsing slowly.
and that's what the model does :wink:
Also, when using a scripted light, don't forget, that it won't be blocked by brushes, but even light up their backside (As I had to find out while playing with those torches) That's because during compilation the light isn't yet existing.

Heydrich, you're welcome. Additionally, if you wanted to
- change the color of the corona, you would have to edit the corona_red.tga
- change the size, edit the scale of the model in the entity properties of it (select it, press 'n')
- change something else, in the corona_red.shader, play with the line
tcMod stretch sin 1.5 0.75 1 0.1, where in this case
sin is the wave function (could be 'sin' _/??\__, 'triangle' /\/\, 'square'__|??|__|, 'sawtooth' /|/|, inversesawtooth' |\|\)
1.5 is the base scale
0.75 is the amplitude (1 would double the scale)
1 is the phase (of no importance here)
0.1 is the frequency (the number of peaks per second)
Franaticus Satanii
Colour Sergeant
Posts: 84
Joined: Tue Aug 19, 2003 5:38 pm
Location: Florida, USA

Post by Franaticus Satanii »

Thanks all.

It's so nice to have friends that care :D
Murphy's Law:
It is impossible to make anything foolproof because fools are so ingenious.
Bilko
Colour Sergeant
Posts: 91
Joined: Sat May 24, 2003 3:06 pm
Location: UK
Contact:

Post by Bilko »

Hey, maybe another newbies perspective might help, couldnt u do this in the script:

tower_pulse:
$redcorona scale 2
wait 0.1
$redcorona scale 1.9
wait 0.1
$redcorona scale 1.8
wait 0.1
$redcorona scale 1.7
wait 0.1
$redcorona scale 1.6
wait 0.1
$redcorona scale 1.5
wait 0.1
$redcorona scale 1.4
wait 0.1
$redcorona scale 1.3
wait 0.1
$redcorona scale 1.2
wait 0.1
$redcorona scale 1.1
wait 0.1
goto tower_pulse
end

I know it is very primitive but wouldn't that work??

Bilko.
Post Reply