jump.tf Forums
Welcome B)

button shooters for dumbies?

finn · 13 · 2490

finn

  • Newbie
  • *
    • Posts: 21
    • Frags: +0/-0
    • View Profile
hey, what's up. i'm making my first map at the moment and i seem to be grasping the basics well enough - thanks to many helpful souls on the internet - but this is one thing i can't find clear instructions on, and my attempts haven't found success with. blind girl did a write-up on the topic (http://www.tf2jump.com/tf2jumpforums/forums.tf2jump.com/index.php/topic%2c601.0.html) but frankly i couldn't follow it. and all the video instructionals i found were several years old, somewhat unclear, and showing how to connect 1 button only.

basically i would like to make a button shooter stage similar to pagoda 8 or 4starters d11, with multiple buttons connected to one door, and don't know where to start, other than making one block a func_door and the buttons func_button.
a lot of mappers evidently know how to set these up so if any one of them could point me in the right direction that would be tight.

thanks


RNC1839

  • Proficient
  • ****
    • Posts: 499
    • Frags: +0/-0
    • View Profile
Make a math_counter, name it, set it's max value to the same as the number of buttons.

Make a func_botton, name it, set "Delay Before Reset" to whatever you want, give it the following outputs:
  • OnDamaged | math_counter name | Add | 1 | 0.00 | No
  • OnOut | math_counter name | Subtract | 1 | 0.00 | No

Go back to the math_counter and give it the output
OnHitMax | <entity> (door) | <input> (open) | etc.

I haven't tested this method so if the buttons do end up like klananannana/facility then just add these outputs to the buttons:
  • OnDamaged | func_button name | Lock |  | 0.00 | No
  • OnDamaged | func_button name | Unlock |  | Delay before reset value | No


https://developer.valvesoftware.com/wiki/Func_button


pants

  • Proficient
  • ****
    • Posts: 458
    • Frags: +0/-0
    • View Profile
No expert here, but hammer is a little bit limited in how you can make multiple inputs affect one output.

Basically as far as I know you can either:

- Make the buttons open individual segements of the door/teleport, or like 'Get Smart' style doors (stacked behind eachother. That way its still just 1 button - > door triggers.

- Alternatively use the logic system somehow. Simple method is to fire outputs from the buttons to a math counter. Set each button to add 1 to the counter, when the counter reaches a max value (say 4 buttons = 4) it fires an output to open the door/teleport. Obviously this has some issues as you can often just shoot the same button 4 times, but you can design the jump with movement (so player cant sit still and shoot it) or by making the buttons depress/move into the wall for a small time period so you have to shoot the other buttons.

There's probably another way with one of the logic entities which just fires a 0/1 binary state and then doing a logic_case or something to fire an ouput when all the logic 'gates' return an input of 1.

In any case you need something like a timeout function that after x seconds if the door doesnt open they return to a 0 state, same for the math counter method, subtracting or resetting the value 0 (likely set at the same interval the buttons reset).

IN SHORT: its a bit more complicated to make multiple inputs make 1 output. Much easier to make a series of doors (1 input 1 output). Can also do some creative visual stuff to make this look cool as well.

EDIT: RNC just elaborated on the counter method


finn

  • Newbie
  • *
    • Posts: 21
    • Frags: +0/-0
    • View Profile
thank you both! i'll give the math_counter option a try and see how i get on. i really appreciate your help.


plep

  • Advanced
  • *****
    • Posts: 639
    • Frags: +0/-0
  • hi
    • View Profile
thank you both! i'll give the math_counter option a try and see how i get on. i really appreciate your help.

Be aware that this technic can be cheated by pressing the same button multiple times (jump_bomb 19 is the best example of this)


John

  • video games
  • Novice
  • **
    • Posts: 90
    • Frags: +421/-69
    • View Profile
Right. If you want, decompile one of Jaska's maps (like pagoda) to get a better buttons mechanic. His maps require you to hit all buttons for the door to open.


finn

  • Newbie
  • *
    • Posts: 21
    • Frags: +0/-0
    • View Profile
i've had a look at pagoda and there's a math_counter system on 8, like RNC described. max value of 4, one input to open door immediately onhitmax and another to close it with a 4s delay. the buttons have an onpressed add 1 output to the counter as well as a subtract 1 with a 5s delay, and a 5s reset time. so the buttons' subtract outputs combined with the reset times must be a way to avoid the problem of being able to shoot a single button multiple times to open the door.


pants

  • Proficient
  • ****
    • Posts: 458
    • Frags: +0/-0
    • View Profile
A quick re-read of the wiki had the entity I was also thinking of:

logic_branch - should be able to use this to have a value of 0 or 1 depending on whether a linked button has been pressed (so 1 logic_branch per button). Most likely a onpressed/damaged firing a toggle or setvalue to the logic_branch, then reset to 0 after your desired delay.

logic_branch_listener - tests the states of a set of logic_branches. Can be set to fire as a pseudo logic gate; ie. all true, all false, true&false.

Haven't tried making multiple input stuff with it yet but if it works the way I think, it might be more robust than a math counter method as the 0/1 values aren't equivalent as in the math counter method; such that even hitting 1 button 4 times (if possible) wouldn't open the door.
« Last Edit: March 08, 2016, 03:13:10 PM by pants »


SALSAA

  • Intermediate
  • ***
    • Posts: 162
    • Frags: +0/-0
  • pipetrick connoisseur
    • View Profile
i have an even better idea

dont make buttons in jumps because they are a pain in the ass and no one likes them
Why do you read this like it doesn't even matter just read my message its probably more important


finn

  • Newbie
  • *
    • Posts: 21
    • Frags: +0/-0
    • View Profile
i have an even better idea

dont make buttons in jumps because they are a pain in the ass and no one likes them

i do and it's my map.


pants

  • Proficient
  • ****
    • Posts: 458
    • Frags: +0/-0
    • View Profile
I wrote about this in regards to jump_free. But if you aren't aware there is now a class specific filter: filter_tf_class. You have to manually copy it into your FGD from the wiki.

So you can make teleports etc. that say only affect soldiers so demomen can skip button jumps or whatever. I do kinda get the viewpoint that its dumb if the jump is impossible or like t9 for a demoman to do without help, because then on tempus everyone just gets button cheats etc.

One way to do it is to just make the doors themselves illusionary and have the teleport infront of them such that you'd never hit the door (as a soldier), then demomen can just fly through to their hearts content. Making the door a translucent material might be a good idea, then just put a pop-up somewhere on the map that lets players know they can skip as one class etc.


finn

  • Newbie
  • *
    • Posts: 21
    • Frags: +0/-0
    • View Profile
null

i'm only really making it with soldier in mind but i'll think about making a way to skip it as demo. i think the hidden intel room on pagoda 8 is a good idea, soldiers can cheat it if they want but i mean what's the point? jumping is fuelled by the sense of accomplishment. or i could make a side door to an airpogo or something that's only doable as demo, like the opposite of what raiin did on the last stage of devils.


pants

  • Proficient
  • ****
    • Posts: 458
    • Frags: +0/-0
    • View Profile
Yeah no worries. Feel free to ask for help if you want some ideas for skipping a button jump.