Making a button that activates when shot?

Avatar
cornontheCoD
150 Posts
Posted Feb 13, 2008
I know how to make the big red buttons from portal, but I want to be able to shoot it with the portal gun to activate it. I would use func_portal_detect unfortunately, you cant place portals on buttons. Isnt there a flag to check that says shooting it activates it? if so, would that include the portal gun?
Advertisement
Registered users don't see ads! Register now!
Avatar
NykO18
183 Posts
Posted Feb 13, 2008
Replied 48 minutes later
I don't think so.
This flag is meant to be used with damages.
And the portalgun doesn't damage anything.
Avatar
cornontheCoD
150 Posts
Posted Feb 13, 2008
Replied 26 minutes later
so how else could i do it?
Avatar
Hyakkidouran
84 Posts
Posted Feb 13, 2008
Replied 49 minutes later
Maybe an invisible brush over the button?
When that brush is hit, detect the portal with portal_detector, and destroy it immediatly. The portal should not even appear.
At the same time you dstroy the portal, activate the button.
Avatar
bizob
186 Posts
Posted Feb 13, 2008
Replied 1 hour later

Hyakkidouran wrote:
Maybe an invisible brush over the button?
When that brush is hit, detect the portal with portal_detector, and destroy it immediatly. The portal should not even appear.
At the same time you dstroy the portal, activate the button.

I just tried it and got it working. I used a func_wall (named "wall")and the nodraw texture. "button_door" is the func_door used to move the top button prop. On the portal_detector add the following outputs:

OnStartTouchPortal1>wall>kill
OnStartTouchPortal2>wall>kill
OnStartTouchPortal1>button_door>open
OnStartTouchPortal2>button_door>open

The portal never shows.

Avatar
Reverend Protocol
20 Posts
Posted Feb 14, 2008
Replied 5 hours later
Very clever! I like it.
Advertisement
Registered users don't see ads! Register now!
Avatar
cornontheCoD
150 Posts
Posted Feb 14, 2008
Replied 14 hours later
thanks, this will be a useful tool to put in my map and will lend to its uniqueness