Is there a better way to make a prop gradually fade in/out (NOT Start/Stop fade dist)

Discussion in 'Mapping Questions & Discussion' started by Werewolf, Jul 27, 2017.

  1. Werewolf

    aa Werewolf Probably not a real Werewolf

    Messages:
    779
    Positive Ratings:
    226
    In short, I want to have a prop_dynamic appear to fade into and out of existence, regardless of where players are stood. So they could be right next to it, and the prop would fade in or fade out without the player moving away from it.

    To be clear, I am NOT talking about the fade distance settings that are used to optimize when a prop is rendered. For my prop I will be keeping them to the default for the time being.

    Now I have achieved this to some degree, by setting the prop's render mode to 'Solid' and the 'FX Amount (0 - 255) set to "0", then sending 'Alpha' inputs to it every few seconds.

    While it works, it feels a bit 'hacky'. What I'd like to know, is if there is a better way to achieve this, ideally so it's a smooth and gradual fade in/out. At the moment I am having the prop fade in over 5 seconds, with increments in the alpha value every second. (0, 51, 102, 153, 204, 255)

    Short of adding more inputs, is there a way to make the prop fade smoothly?
     
  2. Lampenpam

    aa Lampenpam

    Messages:
    1,019
    Positive Ratings:
    337
  3. Tumbolisu

    aa Tumbolisu  I ⌄ I 

    Messages:
    947
    Positive Ratings:
    930
    I have already done a more advanced version of your setup for func_brush entities, but a prop_dynamic would work just as well.
    Just download the VMF in the attachment and see for yourself.
    To change the fading speed, change the refire intervall of the logic_timer and/or its output's parameter.
     

    Attached Files:

    • Thanks Thanks x 1
  4. Werewolf

    aa Werewolf Probably not a real Werewolf

    Messages:
    779
    Positive Ratings:
    226
    Oh I had already set up a more advanced version, what I described above was my test version I did just to check if the system worked. In my advanced version, I have my prop fading both in and out over 17 seconds (to match a sound effect). It equates to a 3.75 point increase/decrease in the alpha value every 0.25 seconds, done over 69 inputs.

    That said, I took a look at your setup and that's certainly a lot simpler! I might just swap my system out for your if I can get the timings right.