How to make something happen only after pushing all buttons

Any aspects of level design for the Source engine.

How to make something happen only after pushing all buttons

Postby boj on Sun Jul 13, 2014 1:07 pm

I have 4 buttons that open different parts.

I would want to make a message show up on the screen using the game_text entity once the player has pressed all 4 buttons.

How would I go about doing that?

I'm making it in Half Life 2
User avatar
boj
Member
Member
 
Joined: Mon Dec 30, 2013 12:12 am

Re: How to make something happen only after pushing all butt

Postby marnamai on Sun Jul 13, 2014 1:22 pm

use a math_counter, set the max legal value to 4

add this output to each button "onpressed/math_counter/add/1" make sure to check the fire only once checkbox

add this output to the math_counter "onhitmax/game_text/display"
User avatar
marnamai
Veteran
Veteran
 
Joined: Thu Nov 10, 2005 12:17 pm
Location: Belgium

Re: How to make something happen only after pushing all butt

Postby Les_Grossman on Sun Jul 13, 2014 1:23 pm

math_counter with max legal value set to 4

every button has output:
on pressed > math_counter > add > 1

and math_counter has output:
onhitmax > game_text > display/enable (or whatever)

edit: ninjad xd
Les_Grossman
Member
Member
 
Joined: Wed Apr 23, 2014 11:09 am

Re: How to make something happen only after pushing all butt

Postby marnamai on Sun Jul 13, 2014 1:26 pm

huehuehue :p
User avatar
marnamai
Veteran
Veteran
 
Joined: Thu Nov 10, 2005 12:17 pm
Location: Belgium

Re: How to make something happen only after pushing all butt

Postby boj on Sun Jul 13, 2014 3:37 pm

thank you both very much, it all worked
User avatar
boj
Member
Member
 
Joined: Mon Dec 30, 2013 12:12 am

Return to Hammer Editor Help

Who is online

Users browsing this forum: No registered users