Spotlight controlled by the player
Moderator: Moderators
- SolidScope
- Lance Corporal
- Posts: 19
- Joined: Tue Jul 13, 2004 1:24 am
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
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
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
G3mInI
- SolidScope
- Lance Corporal
- Posts: 19
- Joined: Tue Jul 13, 2004 1:24 am
-
Cobra {sfx}
- First Lieutenant
- Posts: 193
- Joined: Tue Mar 23, 2004 10:25 pm
- Contact:
-
Green Beret
- Major General
- Posts: 746
- Joined: Mon Apr 19, 2004 12:21 pm
- Contact:
-
Phil {sfx}
- Sergeant
- Posts: 67
- Joined: Thu Sep 30, 2004 2:08 pm
- Location: uk
- Contact:
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.
Senior Modder/Mapper/Scripter/Modeller @ www.mods-r-us.net

