light animation

Discussion in 'Mapping Questions & Discussion' started by MoonFox, Jul 4, 2015.

  1. MoonFox

    MoonFox L10: Glamorous Member

    Messages:
    737
    Positive Ratings:
    72
    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)
     
  2. Pocket

    aa Pocket func_croc

    Messages:
    4,489
    Positive Ratings:
    2,377
    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.
     
    • Thanks Thanks x 2
  3. MoonFox

    MoonFox L10: Glamorous Member

    Messages:
    737
    Positive Ratings:
    72
    I will look into it, and thanks. I was not aware of that
     
  4. Idolon

    aa Idolon the worst admin

    Messages:
    1,592
    Positive Ratings:
    4,715
    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.
     
    • Thanks Thanks x 1
  5. MoonFox

    MoonFox L10: Glamorous Member

    Messages:
    737
    Positive Ratings:
    72
    couldn't this also apply to prop dynamics?
     
  6. Idolon

    aa Idolon the worst admin

    Messages:
    1,592
    Positive Ratings:
    4,715
    If you have a model that looks like a spotlight cone, then yes. Anything that can be parented, really.
     
  7. Egan

    aa Egan

    Messages:
    1,319
    Positive Ratings:
    1,522
    There's actually a particle specifically for this prop:

    [​IMG]

    [​IMG]

    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.
     
    • Thanks Thanks x 3
  8. MoonFox

    MoonFox L10: Glamorous Member

    Messages:
    737
    Positive Ratings:
    72
    this is exactly what I was looking for
     
  9. MoonFox

    MoonFox L10: Glamorous Member

    Messages:
    737
    Positive Ratings:
    72
    last thing I need, the actual beacon to rotate
     
  10. MoonFox

    MoonFox L10: Glamorous Member

    Messages:
    737
    Positive Ratings:
    72
    [​IMG]
    is the properties of the beacon
     
  11. MoonFox

    MoonFox L10: Glamorous Member

    Messages:
    737
    Positive Ratings:
    72
  12. iiboharz

    aa iiboharz Meme Queen

    Messages:
    734
    Positive Ratings:
    1,071
    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"
     
  13. MoonFox

    MoonFox L10: Glamorous Member

    Messages:
    737
    Positive Ratings:
    72
    it works