Well I have written another script this one is for spotlights that are controlled by the player . To use it make script_models model miscobj/searchlightbase.tik and give them all the same targetname . Then execute the script like this .
exec global/player_spotlight.scr mytargetname
The lights starts off and while you press the use key while standing close to them they light up . It will follow your view .
Sweet! Great job bdbodger. Keep em coming! I have learned a great deal from your scripts, as well as others here. Best place to get information for the game as far as I am concerened.
working on version 2 with keys you can set like color of the light and I am going to make it on off . For example but an mg gun beside it and the use key will turn on the light as well as letting you use the gun . Also a key to set health of the light and if it will be destoyable or not . Right now it is so it will just be shot out right away and it won't be useable anymore . Any other suggestions are welcome .
Master-Of-Fungus-Foo-D wrote:that looks cool, but for a flashlight mod, you might want to make the spotlight scale smaller.
umm all i got to say to that is
If you look closely I believe he is standing next to a spotlight he spawned. It is not mounted to the top of his weapon.
bdbodger I have implemented this script of yours into a server side mod of snow park, I put a spotlight at the top of each sniper stand on one of the railings.. great script... works and looks pretty cool.
tltrude wrote:You have to put the targetname you gave to the base at the end of the line, like this.
level waittill prespawn
exec global/player_spotlight.scr mytargetname
And, that script has to be in main/global.
Did that, nothing happened.
I spawned a script_model in my map. Gave it the key model and value of the .tik thing like I should. Gave it the targetname of flashlight. Then went into the maps .scr file, and after waittill prespawn put exec global/player_spotlight.scr flashlight
When I sayid "spawn" I meant go to my new bot map in radient, make a script_model, and give it the key model and value of the .tik. And also give it the targetname that I put after I exec the file in the maps .scr. Yes I did put it in the global folder. I'm not some n00b. But I'll try it again.