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.
Detect +use with enable/disable?
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.
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.
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")