Detect +use with enable/disable?
Quote from FelixGriffin on March 8, 2014, 6:42 pmI'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.
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.
Quote from TeamSpen210 on March 8, 2014, 7:20 pmCouldn'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.
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.
[spoiler]- BEE2 Addons | (BEE2)
- Hammer Addons
Maps:
- Crushed Gel
- Gel is Not Always Helpful[/spoiler]
Quote from FelixGriffin on March 9, 2014, 10:50 amTeamSpen210 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.
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.
Quote from HMW on March 9, 2014, 1:13 pmThe 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")
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")
Other Portal 2 maps: Medusa Glare
Portal 1 maps: Try Anything Twice | Manic Mechanic
Quote from Ace Ryder on September 30, 2014, 5:35 pmIs 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?
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?
Quote from FelixGriffin on October 1, 2014, 11:15 pmI don't think so. You could try a momentary button, depending what you need it for.
I don't think so. You could try a momentary button, depending what you need it for.
Quote from TeamSpen210 on October 2, 2014, 1:49 amFound 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.
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.
[spoiler]- BEE2 Addons | (BEE2)
- Hammer Addons
Maps:
- Crushed Gel
- Gel is Not Always Helpful[/spoiler]
Quote from josepezdj on October 6, 2014, 4:46 am@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?
@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?
Quote from Ace Ryder on October 6, 2014, 9:52 am@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.
@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.