light animation

MoonFox

L10: Glamorous Member
Mar 17, 2015
739
74
I am working on a radio tower with a models/props_gameplay/mvm_gemergency_light.mdl on top. how would I animate a light node to spin with it (I refer to having just Spot_light entity move)
 

Pocket

Half a Lambert is better than one.
aa
Nov 14, 2009
4,694
2,579
If you name a light_spot, it automatically becomes a dynamic light and you can do fun things with it. As far as I know, parenting it to a moving entity so it will move is one of them. There's a hack to get continuously rotating entities into TF2 (since func_rotating was hacked out of it to begin with) but I don't remember what it is off the top of my head.
 

MoonFox

L10: Glamorous Member
Mar 17, 2015
739
74
If you name a light_spot, it automatically becomes a dynamic light and you can do fun things with it. As far as I know, parenting it to a moving entity so it will move is one of them. There's a hack to get continuously rotating entities into TF2 (since func_rotating was hacked out of it to begin with) but I don't remember what it is off the top of my head.

I will look into it, and thanks. I was not aware of that
 

Idolon

they/them
aa
Feb 7, 2008
2,105
6,106
You can't really do that with light_spot. Source does dynamic lightmapping by baking in every combination of lights being on/off, and switching between them when the lights turn on/off.

The entity you probably want is point_spotlight. Then you'll want to make it rotate. Func_rotating is broken in TF2, so my personal recommendation is to use a func_rotating_door and set its distance to 999999999999 (or some other absurd value) so that it theoretically won't stop spinning for at least a month or so.

However, I've had issues in the past with parenting point_spotlight. If that method looks wrong, then you'll probably want to find an existing Valve map, find a decompiled version of it, and look at how they did it. My guess is that it's a particle effect.
 

MoonFox

L10: Glamorous Member
Mar 17, 2015
739
74
You can't really do that with light_spot. Source does dynamic lightmapping by baking in every combination of lights being on/off, and switching between them when the lights turn on/off.

The entity you probably want is point_spotlight. Then you'll want to make it rotate. Func_rotating is broken in TF2, so my personal recommendation is to use a func_rotating_door and set its distance to 999999999999 (or some other absurd value) so that it theoretically won't stop spinning for at least a month or so.

However, I've had issues in the past with parenting point_spotlight. If that method looks wrong, then you'll probably want to find an existing Valve map, find a decompiled version of it, and look at how they did it. My guess is that it's a particle effect.

couldn't this also apply to prop dynamics?
 

Egan

aa
Feb 14, 2010
1,375
1,721
There's actually a particle specifically for this prop:

i7SDItc.png


9HCNrI4.png


So just place an info_particle_system entity in your level,
make the ParticleSystemName keyvalue: mvm_emergencylight_glow
You can give it a StartActive keyvalue to make it auto-play on map start, or give it the Start input from some other output source, and bam, done.
 

MoonFox

L10: Glamorous Member
Mar 17, 2015
739
74
There's actually a particle specifically for this prop:

i7SDItc.png


9HCNrI4.png


So just place an info_particle_system entity in your level,
make the ParticleSystemName keyvalue: mvm_emergencylight_glow
You can give it a StartActive keyvalue to make it auto-play on map start, or give it the Start input from some other output source, and bam, done.

this is exactly what I was looking for
 

MoonFox

L10: Glamorous Member
Mar 17, 2015
739
74
last thing I need, the actual beacon to rotate
 

MoonFox

L10: Glamorous Member
Mar 17, 2015
739
74
issue_regarding%20a%20beacon.jpg

is the properties of the beacon
 

iiboharz

eternally tired
aa
Nov 5, 2014
857
1,291
Look at the model's animations and set the prop_dynamic's default animation to the relevant one.

I think the one for that emergency light thingy is "spin"
 

MoonFox

L10: Glamorous Member
Mar 17, 2015
739
74
look at the model's animations and set the prop_dynamic's default animation to the relevant one.

I think the one for that emergency light thingy is "spin"

it works