Thread: trigger_changevalue and env_render

Results 1 to 3 of 3
  1. #1
    Donated 15NS$ for Sven's Holiday at the Bahamas Puchi's Avatar  
    Join Date
    Nov 2002
    Akihabara, Bochum or Sailune

    trigger_changevalue and env_render

    a little "tutorial" what trigger_changevalue can be used for.
    up until now the mapper used a lot of env_render to fade an entity, or doing other fancy render sequences. it also was hard to break the sequence or add things. on top of it, you need a fuckton of entities to have a smooth fading.

    What you need:
    - your entity that needs the render settings changed
    - one env_render
    - two trigger_changevalue
    - two trigger_random_time
    - one multimanager

    The example map has a third timer to loop the sequence.
    You already can see this uses only a hand full of entities instead of over 50 when you change the render amount by 10 steps from 0 to 250 and back.

    How does it work?
    the env_render obviously changes the render settings. You only need one because the trigger_changevalue is the one that changes, in the example, the render amount. "Operation" is set to ADD and SUB(tract) which is the key here: it takes the current render amount and adds or subtracts 10, passes it to the env_render which changes your entity.
    The timer make sure this happens frequently.
    The multimanager here just makes sure after 25 steps (2.5 seconds, the amount changes every 0.1 seconds) the UP timer goes off and the DOWN timer starts so the func_illusionary starts to fade away again.

    Before you tell me that i could use one of the render fx: true. but those arent controllable.
    you can have it becomming solid in steps which is what i wanted. i can break it at any time and know how much solid it is without having a fuckton of entities. it's also not limited to render amount, you can change EVERYTHING.
    Another example for trigger_changevalue is RNG's usage in kyper kuutio: he changes the turret's health so they're invincible for the first few seconds and can deploy.
    Attached Files Attached Files
    Do it with passion, or not at all.
    Do not say everything you know. Know everything you say.
    [ MarySP ][ nacl-h2o ][ The next SC Version ♥♥♥♥ing pwns! ][Puchis Maps ]

  2. #2
    func_vehicle enthusiaist w00tguy123's Avatar
    Join Date
    Dec 2006
    U.S. West

    Re: trigger_changevalue and env_render

    I was using the renderfx before 4.5 to do something like this, but it didn't give me consistent results (I was trying to make something fade out and disappear). I will be using this tut in the future, thanks!

  3. #3
    I'm in your Sven Co-op, coding stuff Protector's Avatar  
    Join Date
    Sep 2003
    Basel, Switzerland

    Re: trigger_changevalue and env_render

    You could just use the trigger_changevalue to change the render amount of your entity directly, no need for an env_render in between.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts