Spotlight controlled by the player

Post your scripting questions / solutions here

Moderator: Moderators

User avatar
bdbodger
Moderator
Posts: 2596
Joined: Tue Feb 25, 2003 7:34 am
Location: canada
Contact:

Post by bdbodger »

Not sure what you mean but the light does do a trace I guess if I want to rewrite it I could make the light stop a bit short of where the trace hits but like I said a dynamic light will show through a wall depending on the raduis of the light . I used a lightradius of 250 so I guess if it stops short by 125 units then it won't shine through the wall .
Image
User avatar
MPowell1944
Moderator
Posts: 287
Joined: Thu Jan 09, 2003 7:06 am
Location: Woodstock, GA
Contact:

Post by MPowell1944 »

I set this up but it only spawns the base and nothing else.
User avatar
bdbodger
Moderator
Posts: 2596
Joined: Tue Feb 25, 2003 7:34 am
Location: canada
Contact:

Post by bdbodger »

Did you execute it like this after spawning your bases?

exec global/player_spotlight.scr mytargetname

No $ on the targetname . It says how to use it at the top of the script . If you don't see the searchlight in the off condition when you start your map you did something wrong .
Image
User avatar
MPowell1944
Moderator
Posts: 287
Joined: Thu Jan 09, 2003 7:06 am
Location: Woodstock, GA
Contact:

Post by MPowell1944 »

i called the thread spotlights

Code: Select all

spotlights:

local.allied = spawn script_model model miscobj/searchlightbase.tik origin ( -874.54 -3469.43 123.83 ) angles ( 0 90 0 ) targetname allies
local.allied.color = ( 0 0 1 )
local.allied nodamage

local.axis = spawn script_model model miscobj/searchlightbase.tik origin ( -689.72 -1046.02 600.13 ) angles ( 0 -90 0 ) targetname axis
local.axis.color = ( 1 0 0 )
local.axis nodamage

exec global/player_spotlight.scr allies
exec global/player_spotlight.scr axis

end
User avatar
bdbodger
Moderator
Posts: 2596
Joined: Tue Feb 25, 2003 7:34 am
Location: canada
Contact:

Post by bdbodger »

Well should not make any difference but it say this at the top of the script
To use this script, make script_models with model miscobj/searchlightbase.tik and give them
// all the same targetname
I think you may have another mod that is useing those or one of those targetnames try changeing the targetname and see if that helps .
Image
User avatar
MPowell1944
Moderator
Posts: 287
Joined: Thu Jan 09, 2003 7:06 am
Location: Woodstock, GA
Contact:

Post by MPowell1944 »

I just checked and the spotlights are the only things with those targetnames.
Green Beret
Major General
Posts: 746
Joined: Mon Apr 19, 2004 12:21 pm
Contact:

Post by Green Beret »

i made my spotlights the same targetname" myspot "
the biggest part was calling the
exec global/player_spotlight.scr myspot
after it.
Image
User avatar
bdbodger
Moderator
Posts: 2596
Joined: Tue Feb 25, 2003 7:34 am
Location: canada
Contact:

Post by bdbodger »

Well I can't find the problem he is haveing works fine for me and others who have tryed it so what can I say and yes you only need to use 1 targetname for all the spots you can still give them different light color values etc .
Image
User avatar
MPowell1944
Moderator
Posts: 287
Joined: Thu Jan 09, 2003 7:06 am
Location: Woodstock, GA
Contact:

Post by MPowell1944 »

Alright I'll try that.
User avatar
MasterMind
Major
Posts: 316
Joined: Thu Jul 15, 2004 12:10 am

Post by MasterMind »

is there any way we could put this stuff into PA?
Jesus built us a bridge, with 2 boards and 3 nails.
Green Beret
Major General
Posts: 746
Joined: Mon Apr 19, 2004 12:21 pm
Contact:

Post by Green Beret »

maybe a custom map.dunno about scripting it in stock,i dont remeber if it had spotlights?
Image
User avatar
bdbodger
Moderator
Posts: 2596
Joined: Tue Feb 25, 2003 7:34 am
Location: canada
Contact:

Post by bdbodger »

I do not have PA but from what I seen of the dump all classes someone posted a while ago it seems most of the mohaa scripting is the same for PA or almost the same so I do not know .
Image
Post Reply