make a func_button pressed in by default

Discussion in 'Mapping Questions & Discussion' started by KlashFire, Sep 3, 2015.

  1. KlashFire

    KlashFire L1: Registered

    Messages:
    17
    Positive Ratings:
    1
    well, is there a way to make the func button go to it's Lip by default and then other triggers pressit out?

    what I am trying to do is as follows:
    make it so that when a prop_static is damaged, the lights turn on, when damaged again, lights turn off.

    I am doing this by this method:
    make a trigger box tied to a func_button around the entity, make it turn on the light on damaged, then pressin. then press out a different triggerbox so that by damaging this entity, you are actually hitting the other func_button, which, upon damage, turns lights off, presses itself out and presses the original func_button in.

    any easier method or way to make it pressed in by default?
     
  2. worMatty

    aa worMatty Repacking Evangelist

    Messages:
    1,072
    Positive Ratings:
    832
    Yes.

    func button
    (Output) OnPressed > light > Toggle
    (Spawnflag) Don't Move
    (Spawnflag) Damage Activates

    I created a new func_button for this. Use its Delay Before Reset time to specify how soon the switch can be pressed again (default is 3 seconds). You can use :nodraw:, not :trigger:

    The advantage of using one button and the OnPressed output, aside from efficiency is that it can also be used on servers that have tf_allow_player_use 1 (lets players use the +use command like in other games). Especially good for Deathrun maps, where a good activator can instantly trigger a trap without the delay of a melee swing.

    If you want the light to be turned off when the map starts, enable its Initially Dark flag.
     
    • Thanks Thanks x 1
  3. KlashFire

    KlashFire L1: Registered

    Messages:
    17
    Positive Ratings:
    1
    eh, I was being stupid and completely forgot that the toggle output existed. thanks man!
    gonna try the onpressed instead of ondamaged.