local.spot = spawn info_splinepath "targetname" " spotpath1_1"
local.spot.origin = ( x y z )
local.spot2 = spawn info_splinepath
local.spot2.origin = ( x y z )
....
....
....
local.spot.target = local.spot2
local.spot2.target = local.spot3
....
....
....
....
local.spot6.target=local.spot
spotlights on they own
Moderator: Moderators
well have the spotlights spawning,,,but every thing i try to get the spots moving seems to fail,,ive probally tried everything but the correct thing,,may have even got 1 part correct at 1 time or another but had something else wrong uggggg,,im probally just doing something ignorant!!
anyways heres the script so ya can see just what the heck im doing wrong:( now the light is spawning exactly were i want it 2 and i just hid the mg and may even hide the soldier later,,i just dont understand why i cant get them moving,,i have tryed using exactly what ya last post said,,ive reread the tut and tryed using that ,,ive tryed rearanging the pathnode info ,,im not positive the "set" "1" "group" "1" is scripted correctly
everything i seem to try always returns me to to this error
self.org flypath local.path 250 750 200 (global/rescue_spotlight.scr, 81)
self.org ^
^~^~^ Script Error: ScriptSlave Given FlyPath Command with NULL path.
self.org.origin = local.path.origin (global/rescue_spotlight.scr, 80)
self.org.origin = local.path^
^~^~^ Script Error: Field 'origin' applied to NULL listener
thats why i have a idea i may be doing something incorrect with the paths
hope the following isnt to bad for the 1st time i actually tried to script something and make it work
thread spotlightbase
thread spawnguy
thread mg42
thread spotlighttarget
thread spotsearch1
spotlightbase:
//spotlightbase1
local.light = spawn models/miscobj/searchlightbase.tik "targetname" "spotlight" "classname" "script_model" "set" "1" "group" "1"
local.light.origin = ( 200 -210 239)
local.light.angles = ( 0 150 0 )
local.light solid
end
//////////////////////////////////////////////////////////
spawnguy:
local.dude = spawn human/german_winter_type1.tik "targetname" "mg2_gunner" "classname" "ai_actor"
local.dude.health = 100
local.dude.origin = ( 200 -210 239)
local.dude.angle = -129
local.dude.sight = 50000
local.dude.accuracy = 70
local.dude.aggresiveness = 95
local.dude.type_idle = machinegunner
local.dude.type_attack = machinegunner
local.dude.type_disguise = machinegunner
local.dude.type_grenade = machinegunner
end
//-------------------------------------------------------------------------------------------------------------------
mg42:
//mg42 1
spawn statweapons/mg42_gun "targetname" "mg42_1" "classname" "addon_turretweapon_german_mg42"
$mg42_1.origin = ( 200 -210 239)
$mg42_1.angles = (0 0 0)
$mg42_1 maxyawoffset 180 // changed 35
$mg42_1 pitchcaps "-50 50 -50" // changed "-20 20 0"
$mg42_1 turnspeed 30 // changed 15
$mg42_1 pitchspeed 7.5
$mg42_1 viewjitter 1
$mg42_1 nodamage
$mg42_1 solid
$mg42_1 hide
end
//-----------------------------------------------------------------------------
spotlighttarget:
$spotlight.target = $mg2_gunner
$mg2_gunner.target = $mg42_1
end
//-----------------------------------------------------------------------------
spotsearch1:
local.path = spawn info_splinepath "targetname" " spotpath1_1" "classname" "info_splinepath" "set" "1" "group" "1"
local.path.origin = ( -582 -104 -66)
local.path1 = spawn info_splinepath "targetname" "path1" "classname" "info_splinepath"
local.path1.origin = ( -606 220 -59)
local.path2 = spawn info_splinepath "targetname" "path2" "classname" "info_splinepath"
local.path3.origin = ( -605 439 382)
local.path3 = spawn info_splinepath "targetname" "path3" "classname" "info_splinepath"
local.path3.origin = ( -658 -166 382)
// connect up spotlight path
local.path.target = local.path1
local.path1.target = local.path2
local.path3.target = local.path
end
Gold<<mohha freak
anyways heres the script so ya can see just what the heck im doing wrong:( now the light is spawning exactly were i want it 2 and i just hid the mg and may even hide the soldier later,,i just dont understand why i cant get them moving,,i have tryed using exactly what ya last post said,,ive reread the tut and tryed using that ,,ive tryed rearanging the pathnode info ,,im not positive the "set" "1" "group" "1" is scripted correctly
self.org flypath local.path 250 750 200 (global/rescue_spotlight.scr, 81)
self.org ^
^~^~^ Script Error: ScriptSlave Given FlyPath Command with NULL path.
self.org.origin = local.path.origin (global/rescue_spotlight.scr, 80)
self.org.origin = local.path^
^~^~^ Script Error: Field 'origin' applied to NULL listener
thats why i have a idea i may be doing something incorrect with the paths
hope the following isnt to bad for the 1st time i actually tried to script something and make it work
thread spotlightbase
thread spawnguy
thread mg42
thread spotlighttarget
thread spotsearch1
spotlightbase:
//spotlightbase1
local.light = spawn models/miscobj/searchlightbase.tik "targetname" "spotlight" "classname" "script_model" "set" "1" "group" "1"
local.light.origin = ( 200 -210 239)
local.light.angles = ( 0 150 0 )
local.light solid
end
//////////////////////////////////////////////////////////
spawnguy:
local.dude = spawn human/german_winter_type1.tik "targetname" "mg2_gunner" "classname" "ai_actor"
local.dude.health = 100
local.dude.origin = ( 200 -210 239)
local.dude.angle = -129
local.dude.sight = 50000
local.dude.accuracy = 70
local.dude.aggresiveness = 95
local.dude.type_idle = machinegunner
local.dude.type_attack = machinegunner
local.dude.type_disguise = machinegunner
local.dude.type_grenade = machinegunner
end
//-------------------------------------------------------------------------------------------------------------------
mg42:
//mg42 1
spawn statweapons/mg42_gun "targetname" "mg42_1" "classname" "addon_turretweapon_german_mg42"
$mg42_1.origin = ( 200 -210 239)
$mg42_1.angles = (0 0 0)
$mg42_1 maxyawoffset 180 // changed 35
$mg42_1 pitchcaps "-50 50 -50" // changed "-20 20 0"
$mg42_1 turnspeed 30 // changed 15
$mg42_1 pitchspeed 7.5
$mg42_1 viewjitter 1
$mg42_1 nodamage
$mg42_1 solid
$mg42_1 hide
end
//-----------------------------------------------------------------------------
spotlighttarget:
$spotlight.target = $mg2_gunner
$mg2_gunner.target = $mg42_1
end
//-----------------------------------------------------------------------------
spotsearch1:
local.path = spawn info_splinepath "targetname" " spotpath1_1" "classname" "info_splinepath" "set" "1" "group" "1"
local.path.origin = ( -582 -104 -66)
local.path1 = spawn info_splinepath "targetname" "path1" "classname" "info_splinepath"
local.path1.origin = ( -606 220 -59)
local.path2 = spawn info_splinepath "targetname" "path2" "classname" "info_splinepath"
local.path3.origin = ( -605 439 382)
local.path3 = spawn info_splinepath "targetname" "path3" "classname" "info_splinepath"
local.path3.origin = ( -658 -166 382)
// connect up spotlight path
local.path.target = local.path1
local.path1.target = local.path2
local.path3.target = local.path
end
Gold<<mohha freak
You are confuseing me now what script are you useing ? The rescue spotlight script is for spotlights only no ai's , no damage spots , no anything it is just a simple spotlight that goes around in a circle . You need to use the global/spotlight.scr if you are trying to use ai's with it . I believe a couple of posts ago you asked about a normal spotlight with a ai gunner . You can't do that with the rescue_spotlight.scr .
set is not valid on the command line I don't think , neither is group . Maybe I am wrong but I would not do it that way . I don't think you need to put classname info_splinepath on every line or at all . I have spawned them without that .
Maybe you should read the title of the topic of these posts as well .
set is not valid on the command line I don't think , neither is group . Maybe I am wrong but I would not do it that way . I don't think you need to put classname info_splinepath on every line or at all . I have spawned them without that .
Maybe you should read the title of the topic of these posts as well .
well i thought ya had to have ai before the any spolight script would function correctly ugggg,,,no i was wanting to actually use ya script it runs much better and would prob run better in multiplayer,,lag free,,if i understand correctly the global spotlight script isnt good for multiplayer,,,and ive used it be4 in multiplayer m maps and it lags bad heh,,so guess i need to figure out now how to use the best script for the lights ,,which is your script 
Gold<<mohha freak
Gold<<mohha freak
wooohooo i actually got the light shining to the first node now,,,maybe i figure this out hehehehe,,here was latest attempt,,,think im getting a little closer:))
thread spotlightbase
thread spotsearch1
spotlightbase:
//spotlightbase1
local.light = spawn models/miscobj/searchlightbase.tik "targetname" "spotlight" "classname" "script_model"
local.light.origin = ( 200 -210 239)
local.light.angles = ( 0 150 0 )
local.light solid
local.light.set = 1
local.light.group = 1
end
//-------------------------------------------------------------------------------------------------------------------
spotsearch1:
local.spot1 = spawn info_splinepath "targetname" "spotpath1_1"
local.spot1.origin = ( -582 -104 -66)
local.spot1.set = 1
local.spot1.group = 1
local.spot2 = spawn info_splinepath
local.spot2.origin = ( -606 220 -59)
local.spot2.set = 1
local.spot2.group = 1
local.spot3 = spawn info_splinepath
local.spot3.origin = ( -605 439 382)
local.spot3.set = 1
local.spot3.group = 1
local.spot4 = spawn info_splinepath
local.spot4.origin = ( -658 -166 382)
local.spot4.set = 1
local.spot4.group = 1
// connect up spotlight path
local.spot.target = local.spot1
local.spot1.target = local.spot2
local.spot3.target = local.spot
end
Gold<<mohha freak:))))
thread spotlightbase
thread spotsearch1
spotlightbase:
//spotlightbase1
local.light = spawn models/miscobj/searchlightbase.tik "targetname" "spotlight" "classname" "script_model"
local.light.origin = ( 200 -210 239)
local.light.angles = ( 0 150 0 )
local.light solid
local.light.set = 1
local.light.group = 1
end
//-------------------------------------------------------------------------------------------------------------------
spotsearch1:
local.spot1 = spawn info_splinepath "targetname" "spotpath1_1"
local.spot1.origin = ( -582 -104 -66)
local.spot1.set = 1
local.spot1.group = 1
local.spot2 = spawn info_splinepath
local.spot2.origin = ( -606 220 -59)
local.spot2.set = 1
local.spot2.group = 1
local.spot3 = spawn info_splinepath
local.spot3.origin = ( -605 439 382)
local.spot3.set = 1
local.spot3.group = 1
local.spot4 = spawn info_splinepath
local.spot4.origin = ( -658 -166 382)
local.spot4.set = 1
local.spot4.group = 1
// connect up spotlight path
local.spot.target = local.spot1
local.spot1.target = local.spot2
local.spot3.target = local.spot
end
Gold<<mohha freak:))))
woooooohooooo i figured it out!!!!!! of course i gotta add more pathnodes but they moving now!!!!! omg!!!! could have never done it without ya help bdbodger,,,thanx so much:)))))))
thread spotlightbase
thread spotsearch1
spotlightbase:
//spotlightbase1
local.light = spawn models/miscobj/searchlightbase.tik "targetname" "spotlight" "classname" "script_model"
local.light.origin = ( 200 -210 239)
local.light.angles = ( 0 150 0 )
local.light solid
local.light.set = 1
local.light.group = 1
end
//-------------------------------------------------------------------------------------------------------------------
spotsearch1:
local.spot = spawn info_splinepath "targetname" "spotpath1_1"
local.spot.origin = ( -582 -104 -66)
local.spot.set = 1
local.spot.group = 1
local.spot1 = spawn info_splinepath "targetname" "local.spot1"
local.spot1.origin = ( -606 220 -59)
local.spot1.set = 1
local.spot1.group = 1
local.spot2 = spawn info_splinepath "targetname" "local.spot2"
local.spot2.origin = ( -605 439 382)
local.spot2.set = 1
local.spot2.group = 1
local.spot3 = spawn info_splinepath "targetname" "local.spot3"
local.spot3.origin = ( -658 -166 382)
local.spot3.set = 1
local.spot3.group = 1
// connect up spotlight path
local.spot.target = local.spot1
local.spot1.target = local.spot2
local.spot3.target = local.spot
end
Gold<<<mohha freak
thread spotlightbase
thread spotsearch1
spotlightbase:
//spotlightbase1
local.light = spawn models/miscobj/searchlightbase.tik "targetname" "spotlight" "classname" "script_model"
local.light.origin = ( 200 -210 239)
local.light.angles = ( 0 150 0 )
local.light solid
local.light.set = 1
local.light.group = 1
end
//-------------------------------------------------------------------------------------------------------------------
spotsearch1:
local.spot = spawn info_splinepath "targetname" "spotpath1_1"
local.spot.origin = ( -582 -104 -66)
local.spot.set = 1
local.spot.group = 1
local.spot1 = spawn info_splinepath "targetname" "local.spot1"
local.spot1.origin = ( -606 220 -59)
local.spot1.set = 1
local.spot1.group = 1
local.spot2 = spawn info_splinepath "targetname" "local.spot2"
local.spot2.origin = ( -605 439 382)
local.spot2.set = 1
local.spot2.group = 1
local.spot3 = spawn info_splinepath "targetname" "local.spot3"
local.spot3.origin = ( -658 -166 382)
local.spot3.set = 1
local.spot3.group = 1
// connect up spotlight path
local.spot.target = local.spot1
local.spot1.target = local.spot2
local.spot3.target = local.spot
end
Gold<<<mohha freak