Please or Register to create posts and topics.

Detect +use with enable/disable?

I'm trying to find a parentable brush entity that can detect +use, such as a func_button, but which can have its solidity toggled like a func_brush (and not block +use when disabled). Is there such a brush entity in Portal 2?

In essence, I need to detect +use on a motiondisabled cube, but not block the player from picking it up when it's not motiondisabled.

Falsi sumus crusto!

Couldn't you just kill the button when the cube is motion enabled and SpawnAtEntityOrigin it when the cube is disabled?
I think there's a non-FGD input (I saw ingame) that lets you set the origin of an object local to it's parent, if the input exists for func_buttons you could move the button to 10000 units away from the cube to disable it.

My stuff:
[spoiler]- BEE2 Addons | (BEE2)
- Hammer Addons
Maps:
- Crushed Gel
- Gel is Not Always Helpful[/spoiler]
TeamSpen210 wrote:
Couldn't you just kill the button when the cube is motion enabled and SpawnAtEntityOrigin it when the cube is disabled?
I think there's a non-FGD input (I saw ingame) that lets you set the origin of an object local to it's parent, if the input exists for func_buttons you could move the button to 10000 units away from the cube to disable it.

The first option won't work with cubes from droppers, because I don't know what the targetnames of the cubes will be until runtime.

The second might cause problems with the distant button swinging around through triggers and such, but I'm inclined toward it unless there's a better solution.

Falsi sumus crusto!

The department of trying stuff until it explodes, writes:

Turn off "smart edit" and add a "spawnflags" attribute to the cube, with the value 256.
This corresponds to the "generate output on +use" flag that some other entities have, and will generate an "OnPlayerUse" event when the player +uses the cube, even if it's motion-disabled.

If you just want the player to be able to pick it up, maybe 64 works too. ("Enable motion on Physcannon grab")

Sendificate series: Sendificate | A Beam Too Far | Airtime | 302
Other Portal 2 maps: Medusa Glare
Portal 1 maps: Try Anything Twice | Manic Mechanic

Is there a way to make say a func_button detect +use and -use, so that something turned on on +use and off on -use....essentially meaning the player has to hold the use key?

"I thought this site was dead." -Conspiracy Core

I don't think so. You could try a momentary button, depending what you need it for.

Falsi sumus crusto!

I need something that works exactly like func_button_timed

"I thought this site was dead." -Conspiracy Core

Found something - the Alias console command lets you bind a command to a another command, so you can trigger relays or something using ent_fire from that.

My stuff:
[spoiler]- BEE2 Addons | (BEE2)
- Hammer Addons
Maps:
- Crushed Gel
- Gel is Not Always Helpful[/spoiler]

@Ace Ryder: what exactly are you attempting to make? Please explain, I might have an alternate way to do it, but I'd like to test it out achieving what you are attempting to make, understand? :P

ImageImageImageImageImageuseful tools and stuff here on TWP :thumbup:
[spoiler]ImageImageImageImageImage[/spoiler]

@josepezdj I'd like to have two valves, I want both players to be holding e on the valves and trigger a coop_manager. So if one person stops holding e for even a picosecond, the trigger can't work.

"I thought this site was dead." -Conspiracy Core