Welcome to PlagueFest.com! Log in or Sign up to interact with the Plague Fest community.
  1. Welcome Guest! to interact with the community and gain access to all the site's features.

Need Help w/ triggers/buttons

Discussion in Mapping Discussion started by The Crowbar, Oct 6, 2014

  1. Feb 22, 2014
    I am unsure how to get this to work, and it's a little too specific for me to find a tutorial on it, as I also have no clue what to even call it.
    I am trying to have two "documents" that need to be picked up, removed once they are picked up, and trigger a door to open once both have been picked up . I am not very experienced with triggers/breakables,etc but I learn very quickly. Problem is, this seems like you need to add a couple steps to get this to work and I have not figured out the combination.
    So far, all I have come up with is to turn the documents into a func_button and have a trigger_once kill it once you press "use" on it, so I think that involves putting an output on func_button so that onpressed makes the trigger activated and then kill the func_button..
    am I on the right track, or making this more complicated than it needs to be?
    I have also tried that "counter" thing so that you need 2+ things to open a door but that never seems to work properly even though I follow tutorials on that too.
    [also need help with those fancy entities that are objects that do stuff to zombies, but that can be discussed at a later time in more detail]

    any help would be great, and I would prefer you message me on steam
  2. Mar 8, 2013
    you don't need to kill the button. just set Delay Before Reset to -1. this means the button can only be pressed once. the buttons should each have this output:

    My Output: OnPressed
    Target Entity: [name of math_counter entity]
    Target Input: Add
    Parameter: 1

    now, you'll need a math_counter. name it, and set Max. Legal Value to 2. make an output OnHitMax, and put whatever it is that you want to happen when the two documents are collected.
    • Like Like x 1
    • Mapping King Mapping King x 1
    • Feb 24, 2011
      If you're really picky about being "clean" with stuff there is a safe way to kill entities.
      From my experience, killing an ent multiple times might result in crashes, so it's a no-go for most of it, though there's a neat little trick you can use in order to make sure it gets killed once and once only.

      Add this output to the ent you want killed:
      >My Output: OnUser1
      >Target Entity: !self
      >Target Input: kill
      >OnceOnly yes

      Then instead of using "kill" on the ent you want killed you need to make sure to call "FireUser1"
      This way you'll just call a method for the ent to kill itself once IF it even exists.
      • Like Like x 1
      • Mapping King Mapping King x 1
      • Feb 22, 2014
        awesome! thank you both, really helped me out