Question about func_button

Discussion in 'Mapping Questions & Discussion' started by BenCo, Jan 3, 2016.

  1. BenCo

    BenCo L5: Dapper Member

    Messages:
    242
    Positive Ratings:
    161
    So currently i'm making a deathrun map for tf2. In tf2 button can only be activated by damaging it because the game dont use a "Use" bind. In my map there is 2 doors where players have to decide which one is the good and which one is the bad. Our activator have two buttons to activate: if he choose the left button the left door will be the bad. If he chooses the right button the right door is the bad. But now the problem...If the activator chooses the left door to be bad then he can still activate the right door. This is bad since he forced to activate just one. I set the buttons to fire only once, to lock the button when the other is activated but no i still cannot disable the other button when one of them activated. So do anybod yknow how to do fix this?
     
  2. zahndah

    aa zahndah professional letter

    Messages:
    718
    Positive Ratings:
    627
    if you 'kill' the other button it would simply vanish as soon as the 1st one was pressed, so death can only activate 1 of them then.
     
  3. BenCo

    BenCo L5: Dapper Member

    Messages:
    242
    Positive Ratings:
    161
    Oh thank you! You helped me alot! First i tought that would kill the activator or something else. Idk why. Thanks again!
     
  4. Chrazini

    Chrazini L1: Registered

    Messages:
    4
    Positive Ratings:
    3
    I don't understand why you're unable to lock the button. Have you tried locking the door instead? Killing the buttons seems a bit excessive, but if you don't mind the buttons just vanishing, I guess it's a fine solution to your problem.
     
  5. BenCo

    BenCo L5: Dapper Member

    Messages:
    242
    Positive Ratings:
    161
    Well I tried everything and it seems only killing the buttons the answer to fix this problem. Maybe on later maps I do something else with it. Btw if i can and it's allowed to upload deathrun maps then you will see the map in just a few days :)
     
  6. Izotope

    aa Izotope Never releases maps

    Messages:
    622
    Positive Ratings:
    586
    Locking buttons works. It didn't work in your case because you use the "OnDamaged" Output.
    This fires when you damage the buttons, whether it's locked or not.
    You should use the "OnPressed" Output in all your buttons instead, this allows you to lock them if you wish to do so.
    But I personally kill them as well.

    Keep in mind that you have to tick the "Damage activates" flag in order for the "OnPressed" output to work.
    I also recommend to tick the "Use activates" flag, because you CAN bind "Use",
    and some people (like me) are actually using this method.

    There are a few advantages for activating buttons with the "Use" bind:
    - You don't suffer the fire delays of your weapons.
    - It's silent, meaning you can use this to trick the runners.

    I hope this information helps you.
     
    • Useful Useful x 2
  7. BenCo

    BenCo L5: Dapper Member

    Messages:
    242
    Positive Ratings:
    161
    This is indeed very helpful. Well i like the buttons locking much better. It's just strange if buttons disappear. And also I didn't knew that you can bind Use. Anyway thanks again! My buttons finally work correctly!
     
  8. UKCS-Alias

    aa UKCS-Alias Mann vs Machine... or... Mapper vs Meta?

    Messages:
    1,264
    Positive Ratings:
    748
    If you dont want to kill the button just put a relay between the button and disable the relay. That way a +use requirement isnt needed. And you can even combine both the damaged and use events.
     
  9. Izotope

    aa Izotope Never releases maps

    Messages:
    622
    Positive Ratings:
    586
    You don't need a relay to use both damage and use. You just need to use the OnPressed Output instead of the OnDamaged and have "Damage/Use activates" flags ticked.