Ads keep us online. Without them, we wouldn't exist. We don't have paywalls or sell mods - we never will. But every month we have large bills and running ads is our only way to cover them. Please consider unblocking us. Thank you from GameBanana <3

Disabling / Enabling Button with another button - A Question for Counter-Strike 1.6

Question Solved

This Question was answered and a solution was chosen.
Button A activate door.

Button B deactivate Button A, makes that after pressing it, it would not activate doorm, how to do it?

scenario: there is door which can be opened with button, there is also generator that power up this door, after turning generator off (buttonB) buttonA should stop working.

Many thanks for all help!
  • The Bubblegum Goth avatar
    The Bubblegum Goth username pic Joined 1y ago
    Offline
    951 points Ranked 42,768th
    11 medals 1 legendary 1 rare
    • Returned 5000 times Medal icon
    • Returned 1000 times Medal icon
    • Returned 100 times Medal icon
    • 1 post awarded Exemplary Feedback Medal icon
    • One month a member Medal icon
    • 5 posts awarded Exemplary Feedback Medal icon
    7d 6d
    0. func_door; targetname - door [This is the door which should be opened]

    1. func_button; targetname - button; target - door [Our main button which triggers the door]

    2. func_door; targetname - generator; target - generatoroff; toggle - yes [Generator. Note that it should be exactly func_door because it should get reset each new round]

    3. multimanager; targetname - generatoroff;

    target [1] - targetbuttondisable; delay - 0,01;

    target [2] - targetgeneratoroff; delay - 0,01; [This entity will show the behavior of our generator getting turned off. Generator manager will activate two changetarget triggers which will disable our button and also change the target of the generator func_door so it will activate another multimanager]

    4. trigger_changetarget; targetname - targetbuttondisable; target - button; newtargetname - (leave empty); delay - 0,01 [This changetarget will remove target field from func_button and result in our button not being able to open the door]

    5. trigger_changetarget; targetname - targetgeneratoroff; target - generator; newtargetname - generatoron; delay - 0,01 [This changetarget switches the generator behavior. Next time you switch the generator it will activate another multimanager - generatoron]

    6. multimanager; targetname - generatoron;

    target [1] - targetbuttonactivate; delay - 0,01;

    target [2] - targetgeneratoron; delay - 0,01 [This manager shows the behavior of our generator getting turned on. It returns back the name to func_button and changes target of the generator func_door back to targetgeneratoroff]

    7. trigger_changetarget; targetname - targetbuttonactivate; target - button; newtargetname - door; delay - 0,01 [Gives the name to the func_button back so it can be activated again]

    8. trigger_changetarget; targetname - targetgeneratoron; target - generator; newtarget - generatoroff; delay - 0,01 [This changetarget switches the generator behavior. Next time you switch the generator it will activate another multimanager - generatoroff]

    Please note that I haven't tested it. I used this system for one of my maps and it actually works but this entity structure may not work. I may have some time tomorrow to test it and give you 100% working system.
    • Helpful x 1
    Star vs the forces of Mapping
    URL to post:
  • [FPS] Kayn avatar
    [FPS] Kayn Joined 29d ago
    Offline
    79 points Ranked 42,853rd
    12 medals 3 rare
    • Became a Game Pioneer Medal icon
    • Submitted 30 Prefabs Medal icon
    • 10 submissions featured Medal icon
    • Thanked 5 submitters Medal icon
    • Received thanks 5 times Medal icon
    • Submission featured Medal icon
    7d
    Usually, I use Multi Manager Tool Entity for these jobs. You can make anything timed and delayed by what you want.

    Use Multi Manager Tool, there is a billion tutorials for it
    WE ARE YOUNG, LIFE IS FUN!
    URL to post:
  • dimaspaf14 avatar
    dimaspaf14 Joined 9mo ago
    Workin bro
    1,684 points Ranked 22,288th
    7d
    intresting..
    Useless avatar
    Mantra
    Useless
    URL to post:
  • The16Mapper avatar
    The16Mapper Joined 2mo ago
    Offline
    934 points Ranked 42,872nd
    7d
    Tie a trigger_changetarget to be triggered by func_button B and make it change func_button A's target to anything else, or even empty.
    • Helpful x 1
    Mapper guy
    URL to post: