Page 2 of 3

Posted: Mon Aug 02, 2004 1:48 am
by SkiLLeT
Hey I had the same problem but i fixed it.

under

level waittill prespawn

//*** Precache Dm Stuff

thread Lights
exec global/player_spotlight.scr towerlights

i think you need to thread the lights b4 u exec the .scr

Posted: Mon Aug 02, 2004 5:00 am
by SolidScope
G3mInI,

Hey! I got it to work. Thanks a lot G3mInI. Although I have no idea why it wouldn't work before. This time I just scripted the spawning of the model like you did.

Posted: Mon Aug 02, 2004 11:21 am
by bdbodger
Version 2 is now done . player_spotlight.scr

changes:

you can now add a color and health to the beam

the spotlight also spawns a beam so you can tell where the light is comeing from

you can have the base target something and the trigger that activates the spot will be at the origin of the targeted entity like an mg gun for example

got rid of the light at the spotlight that use to lightup the player useing the light

the use key turns on and off the light you don't need to hold the use key any more

Here is a test sample I used for mohdm5 // snowy park

local.gunbase = spawn script_model model models/statweapons/mg42_bipod_nonstatic.tik origin ( 3796.69 -5150.08 234.13) angles (0.00 101 0.00)
local.gun = spawn models/statweapons/mg42_gun.tik origin ( 3796.69 -5150.08 237.13) angles (0.00 101 0.00)
local.gun targetname thegun

local.s1 = spawn script_model model miscobj/searchlightbase.tik origin ( 4056.53 -4411.25 216.13 ) angles ( 0 205 0 ) targetname myspot
local.s1.color = ( 1 1 0)
local.s1.health = 100

local.s2 = spawn script_model model miscobj/searchlightbase.tik origin ( 3729.59 -5142.40 216.13 ) angles ( 0 140 0 ) targetname myspot
local.s2.color = ( 1 0 0)
local.s2.health = 200
local.s2.target = $thegun

local.s3 = spawn script_model model miscobj/searchlightbase.tik origin ( 3347.93 -6009.08 216.13 ) angles ( 0 182 0 ) targetname myspot
local.s3.color = ( 1 0 1)
local.s3.health = 300

local.s4 = spawn script_model model miscobj/searchlightbase.tik origin ( 523.88 -4011.00 208.13 ) angles ( 0 325 0 ) targetname myspot
local.s4.color = ( .5 0 .5)
local.s4.health = 400

local.s5 = spawn script_model model miscobj/searchlightbase.tik origin ( 540.37 -2841.19 208.13 ) angles ( 0 300 0 ) targetname myspot
local.s5.color = ( .1 .1 0)
local.s5.health = 500

exec global/player_spotlight.scr myspot

Posted: Mon Aug 02, 2004 5:31 pm
by G3mInI
I tested out the new script. Works well the first time the map is executed. However when I type in 'restart' in the console, the spotlights act very strange. The base moves with the player and the beam turns off and on but the beam seems to be in a fixed position. It does not move with the searchlight. I tested several times to make sure and repeatedly got the same result. It's as if the spotlight beam is not being reset upon restarting the map. Any ideas ?

G3mInI

Posted: Mon Aug 02, 2004 10:17 pm
by bdbodger
execute the script after level waittill spawn

Posted: Mon Aug 02, 2004 11:34 pm
by SolidScope
G3mInI wrote:the beam turns off and on
that could be due to you holding down "use" when you only need to hit it once for on and once again for off.

Posted: Tue Aug 03, 2004 4:44 am
by G3mInI
bdbodger wrote:execute the script after level waittill spawn
That fixed it. I had the thread before level waittill spawn and the execute command was in that thread.. all better now... great work.

G3mInI

Posted: Tue Aug 10, 2004 1:17 pm
by Cobra {sfx}
One problem i noticed with spotlights was that they shine straight thru buildings etc, dont know if yours are doing the same - we had them on hunt and had to be careful where they were aiming as it looked a bit daft shining straight thru walls and things.

Posted: Tue Aug 10, 2004 10:48 pm
by bdbodger
That is the problem with dynamic light no way around it .

Posted: Thu Aug 12, 2004 5:38 pm
by SkiLLeT
Is there anyway to start with the lights on, instead of off?

Posted: Thu Aug 12, 2004 5:56 pm
by bdbodger
Not the way the script is written you will have to turn them on .

Posted: Thu Aug 12, 2004 8:08 pm
by SkiLLeT
ok thanks. Does anyone know the name of the spotlight model? i want to spawn some spotlights that are turned on. It doesnt have to move like the mod bdbodger did.

Posted: Thu Aug 12, 2004 8:27 pm
by bdbodger
miscobj/searchlightbase.tik

and

miscobj/searchlightoff.tik

and

miscobj/searchlight.tik

Posted: Fri Nov 05, 2004 9:47 pm
by Green Beret
i can get the spotlights to work in every map besides my own..lmao :shock:

Posted: Sat Nov 27, 2004 10:37 am
by Phil {sfx}
bdbodger wrote:That is the problem with dynamic light no way around it .

If you use trace, like jv as in the flashlights for MW, they dont go threw walls.