Forums

Pages: [1]
Author Topic: Jump Mapping - Setting Up Buttons like a Blind Girl  (Read 770 times)
Maggot
*

Posts: 49
alright - i kinda don't have much about anything to do right now, and i realized - this has bugged me on quite some maps now, so here is a tutorial for it:
1. Setting up Buttons that do something,
2. setting up buttons that do something the way i do it
and 3. setting up multiple buttons for the same thing to happen - the way i do it (talking to you Raiin - and your counters O_O)
example here, and this is the important part:
shoot 2 buttons, to open 1 door!
(can be extrapolated to more quite easily)

also: no Pictures because im lazy and this stuff is kinda self explanatory once your into hammer a bit ;)
and: i kinda take 1 and 2 as set basics, im not going into this any deeper than: if you dont know how, here is a very short explanation, if this doesn't help, go google or whatever ;)

1.
so, setting up a button is kinda easy
make something a brush based entity called func_button
tadaaaaa
in the options (alt+enter or the window that appears after your tie to entity/ctrl t command) you can now go to the *Outputs* tab and do whatever you wish, like tying this to a door or a teleporter, and making it activate, like open or close or whatever *onDamaged*
for that the respective object needs a name - give it one, klick the small pick tool, and click the object in the 3d window, or just type the name down
then you can chose to open the door/disable the porter or whatever

up to here, everyone should be able to easily follow this

2.
but: for example with the teleporter, you'll soon run into a small problem: how do i enable it again?
the obvious solution would be to enter an enable to the button after a certain amount of time

in my case that caused some weird issues - mainly the problem, that the porter would enable again, no matter if you shoot the button again, or not - so you have to wait for the button to reset the timer again, if you messed up your jump immediately, instead of being able to just fire it and go again

how i solved this:
i used a logic_relay --- a very useful point based entity
i told the button to *trigger* the relay, that then itself triggered whatever had to be done by the button initially

for this thing, there is a neat little command called: cancel pending
what this does, is just stop the relay from firing outstanding commands, like activating a teleporter again
i fire this before the actual trigger command, and voila, you can shoot the button, mess up, shoot it again, and everything resets properly
so the button fires: cancel pending, trigger relay .1 seconds later (i use this timer to make sure the commands come in the right order... no idea if it works without...)

a problem with this: you can cheat jumps when you have a friend to keep the *door open*, who keeps shooting the button for you
but in my opinion, the mess up thing is greater than the cheating value, so... whatever

3. how to set up multiple buttons, that all have to be activated to trigger an event
once you know how this works, you can kinda imagine the wildest combinations, as long as you can keep up with the logic behind it

what we need here:
a logic_branch and a logic_branch_listener, in addition to the buttons, the relays and whatever needs to be triggered - lets say a door this time

a short explanation:
a logic branch is kinda just a variable that can be set to 1 or 0, and needs a name in order to be used
the listener can now get all the branches names, and act on certain outputs of them

an example, we do 2 buttons, same thing as before
the buttons fire a cancel command on 2 relays, then trigger em
the output of those relays is now a bit different, as we change a branch from 0 to 1 with each relay, and then after some set time, reset it to 0
so, button 1 is fired -> relay 1 is canceled, relay 1 is triggered .1 seconds later -> branch 1 is set to 1, branch 1 is reset to 0 after a set amount of time, lets make it 7 seconds here.
same for button 2 -> relay 2 -> branch 2

the whole setup is made, now we are gonna open the door using the listener
add the name of branch 1 and 2 to the listeners respective Property names, namely Logic Branch 01 = branch_01 and 02 = branch_02
next lets go to the outputs tab again, and see which options we got:
lets chose our door *door_01* and add an output for it
on my output named we now got 3 options
on all false --- if every single value is 0 here, this will fire up immediateld
on all true --- same as above, but for all 1
and on mixed --- kinda self explanatory too, if you got 1s and 0s this will shoot
so for the door to open on all buttons, we now can tell the listener:
on all true: open door
on all false: close door
on mixed: close door
this way the door will open as soon as all buttons are pressed, and close again when a buttons timer runs out

and thats the whole secret to it - now that everyone knows those things exist, use em to your advantage!

so hopefully i wont see any more button jumps now where you can just fire the same thing 4 times and the door opens, or where the resets are messed up or... whatever ;)


oh, and one more thing:
if there is a way to do this without the relays, don't be mad at me or stuff, just tell me how - i just found this worked well for me up to now, and haven't found any problems with this... so ... yea... the setup is kinda tedious sometimes, though its a lot better than broken button jumps ^^

laters

p.s.
if anyone thinks of a button thing that cant be done with this setups, feel free to ask/comment/annoy anyone you like - or whatever - including me :)

pps.
sorry for the bad spelling... didn't tripplecheck...
« Last Edit: March 04, 2012, 12:45:25 PM by Blind Girl »
   
Offline  Wolsk
Rocketeer
****

Posts: 301
i love you
You don't have to wait to shoot the buttons on your map?  I never knew that... :x

A way to avoid cheating would be to flash the teleport on for 0.1 seconds whenever you shoot the button.  That way, whenever your friend shoots the button to help you out, it sends you back to the start instead.  However, if there is someone on the jump standing there shooting the button just to fuck with you, you end up going back constantly.  Not sure which way would be better... :v

Good button tutorials, by the way.  You're going to make House happy.


---------------------------


klanana:  I DID NOT EAT THE CAT
dellort: This mod is pretty cool, just wish the devs would fix the bug that allows MIKE to play on it.
   
Maggot
*

Posts: 49
You don't have to wait to shoot the buttons on your map?  I never knew that... :x

A way to avoid cheating would be to flash the teleport on for 0.1 seconds whenever you shoot the button.  That way, whenever your friend shoots the button to help you out, it sends you back to the start instead.  However, if there is someone on the jump standing there shooting the button just to fuck with you, you end up going back constantly.  Not sure which way would be better... :v

Good button tutorials, by the way.  You're going to make House happy.

you had to wait in the first versions - and that annoyed me enough to actually look into a bit of logic work and find a way to cancel that ;)
the flashing the teleport can be particularly annoying when 2 people are stuck on the same jump, and dont wait up for each other - they dont even need bad intentions for it to mess them up majorly - but every mapper has to figure out to herself if the no-cheating way is worth the trouble i guess :)

im gonna make someone happy?
then this already proofed a success, thanks ^_^
   
Offline  Drexen
Rocketeer
***

Posts: 282
could just make it you cant shoot all the buttons from the start of the jump? kinda depends how the jump is setup.
   
0 Members and 1 Guest are viewing this topic.
Pages: [1]
« previous next »


spirit Powered by SMF 2.0 RC5 | SMF © 2006–2011, Simple Machines LLC