Moving light


(LaggingTom) #1

Any ideas on how to make it? Obviously I can’t make a script mover and a light as the same entity…


(MadJack) #2

setposition <targetname> 
Moves entity to position of target entity.

Haven’t used it yet but it’s probably what you want to use. How to use it is another thing altogether… I was browsing the LDR when I checked if there was any Q… Lucky you :stuck_out_tongue:

HTH


(LaggingTom) #3

Thanks, it was more of a curiousity question. It will make the train look more realistic when it moves on my next map :wink:


(MadJack) #4

Though you probably wouldn’t get any benefit from moving a light since light is compiled beforehand. Unless you use a dlight but I’d suspect it would be horrible on the FPS since a fixed dlight is already hard on that. I can imagine a moving one.


(chavo_one) #5

Every time you shoot a panzer rocket, the game moves a dlight for the light from the rocket exhaust. So it’s not that it’s hard on the FPS. It’s just not possible, to my knowledge, for a mapper to move one.


(LaggingTom) #6

Blah. Maybe I can use shooter_rocket for the moving light :wink:


(SiX) #7

V52!

It is possible to have moving lights in ET. I’m planning on using moving dynamic lights in my 3rd et map im going to be starting soon. I wasn’t going to spill the beans on how to do this until after I released the map but eh, that’s no fun :slight_smile: Anyway…

You can have moving light in your map by creating a dlight entity and adding a targetname and scriptname key to it, so as an example we’ll pretend we will be adding a headlight of some sort to our tank:

targetname tank_light
scriptname tank_light

In your script file all you do is attach it to a tag:

tank_light
{
spawn
{
wait 300
attachtotag tank_shell tag_smoke
}
}

Depending on what exactly you might want to use it on may or may not be as easy as this. But these are the basics to get it to work. Hope this helps everyone who needs moving lights in their map. :slight_smile:


(chavo_one) #8

I love it when I’m wrong. :smiley:


(LaggingTom) #9

I’ll test it soon enough

For reference to you, Six, I’m making a map wherin you are on a moving train at night. The lights will (hopefully) go zooming by so as to working with my scrolling textures to make the train actually look like it is in motion.


(SiX) #10

That’s a cool idea :slight_smile:
It should work with it. The meathod I’m using will need a tag to attach the entity to. You can also experiment with other things like followtrain ect. It seems like ALMOST any dynamic entity in the ET engine can be attached to a tag. Mad props to SD for that feature.