Page 2 of 2

Posted: Wed Oct 08, 2003 10:00 pm
by wacko
made an update to the last post.
:oops: hopefully it won't get more confusing

Posted: Wed Oct 08, 2003 11:18 pm
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.

Posted: Thu Oct 09, 2003 1:31 am
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
*/

Posted: Thu Oct 09, 2003 7:42 am
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)

Posted: Thu Oct 09, 2003 1:34 pm
by Franaticus Satanii
Thanks all.

It's so nice to have friends that care :D

Posted: Sat Oct 18, 2003 10:46 am
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.