vehicles lights
by Anthony Todd Hayslett · in Torque Game Engine · 09/13/2002 (12:11 pm) · 13 replies
Does anyone have a script for lights on a vehicle? Like in Tribes2 so you can turn headlights on and off.
#2
Gonna dig...
09/13/2002 (2:11 pm)
Hmm, would it be possible to incorporate some of Melv's awesome lights into this somehow? I seem to remember there being some blinking light objects that could be manipulated in the editor with realtime updating. Gonna dig...
#3
09/13/2002 (2:22 pm)
Melv's FXlight can be attached to something, the datablock version that is. So, it should be possible to attach it to a vehicle. Our programmer had no luck with it yet tough... but I think the problem was mainly the model we experiment with. Can someone tell me how it should be set up? Both model and code wise?
#4
09/13/2002 (6:13 pm)
There is a guy in T2 by the name of TerrorX that is making a mod, and he has enabled lights on a herc. So why shouldn't just be a addon script.
#5
Buuut heres an idea: make it so that you can attach item datablocks to stuff ... then make a node for each headlight or whatever. That way you can make it create an item and then attach it onto the headlight nodes :P
(remember, itemdata does support lights in them)
09/13/2002 (7:23 pm)
actually his "lights" are simply a shape that has transparency on it .. with no collision mesh on it (so nothing to special .. just a little artistry).Buuut heres an idea: make it so that you can attach item datablocks to stuff ... then make a node for each headlight or whatever. That way you can make it create an item and then attach it onto the headlight nodes :P
(remember, itemdata does support lights in them)
#6
09/13/2002 (8:03 pm)
If I knew how to do it I would. I just thought someone might have created a scripted light with some new textures. Making the script to bind to a key so that you can turn the lights off or on but it would have to be client side.
#8
09/13/2002 (9:07 pm)
The terms of use doesn't seem to indicate that the mod is open sourced. Are you sure about this?
#9
I'm afraid you'll have to ask him if you want something more solid than that. :-)
09/13/2002 (10:36 pm)
I'm going by his (Dev's) signature and referring scripters to his code in the tribes2maps forum. I'm afraid you'll have to ask him if you want something more solid than that. :-)
#10
09/13/2002 (11:20 pm)
I would think that you could create mounting locations on the front of the vehicle that would allow the mounting of an object to it. You would have to figure out how to make an object create light (would probably have to be done in the source of the engine, not in script though). If you could get an object to project light, you could script 2 objects to swap each other (1 lit, the other not) to allow for the driver to turn the lights on and off.
#11
Only.. how do you need to setup the vehicle (adding mountpoints.. but with what name?) and how do you mount it in the code?
09/14/2002 (2:35 am)
euhm... like I said.. mount Melv's fxlightdb ... you'll have cool lights, even with flares... the terrain gets lighted too becuase of it...its basically adding dynamic lights to your vehciles. Only.. how do you need to setup the vehicle (adding mountpoints.. but with what name?) and how do you mount it in the code?
#12
There will be a field that has lighting the environment as well (not simply the flare kind of thing).
Now what WOULD be cool, is if you incorporated that with a spotlight effect (basically an alpha'd cylinder shape that was pointed slightly down at and angle from the light to show the beam cast. You'd possibly need to alter melvs light to be able to use spots instead of omni lights.
Phil.
09/14/2002 (2:38 am)
Seems simple enough, make sure the vehicle has a couple of mount nodes at the lights, then simply create two of melvs lights and mount one on each node.There will be a field that has lighting the environment as well (not simply the flare kind of thing).
Now what WOULD be cool, is if you incorporated that with a spotlight effect (basically an alpha'd cylinder shape that was pointed slightly down at and angle from the light to show the beam cast. You'd possibly need to alter melvs light to be able to use spots instead of omni lights.
Phil.
#13
09/23/2002 (2:38 pm)
I've been thinking of integrating melv's light with this www.garagegames.com/mg/snapshot/view.php?qid=331, but a part of the model that animates would work too, and might be more flexible, if less integratable.
Associate Anthony Rosenbaum