cube auto-snap to button
Quote from Brainstone on November 4, 2012, 3:42 pmI played this custom map ca. 1 year ago, don't know its name anymore, in which you had a lasercube and a cube-only button. When you moved the cube close towards the button, it would auto snap into the right position, providing that the laser passing above the button would be deflected into the right direction.
I need the same. The rotation doesn't matter, but it's important that the cube will snap instantly onto the button without much unnecessary fizzling around, because it's an action-filled scene. Anybody of you knows, whether that was a certain entity or a set of triggers?
I played this custom map ca. 1 year ago, don't know its name anymore, in which you had a lasercube and a cube-only button. When you moved the cube close towards the button, it would auto snap into the right position, providing that the laser passing above the button would be deflected into the right direction.
I need the same. The rotation doesn't matter, but it's important that the cube will snap instantly onto the button without much unnecessary fizzling around, because it's an action-filled scene. Anybody of you knows, whether that was a certain entity or a set of triggers?
Quote from josepezdj on November 4, 2012, 4:03 pmIf you only want to make the cube sit straight on the button with no chance of weird angles, I'd suggest a "box" (only the 4 surrounding sides, not up or down ones) made out of invisible textured brushes tied to a func_clip_physics entity. Check:
[spoiler][/spoiler]
You can activate it only when the button is activated and deactivate it some secs later...Other option would be a point_push/trigger_push with negative value to pull from the cube to the button and make it sit down straight quickly
If you only want to make the cube sit straight on the button with no chance of weird angles, I'd suggest a "box" (only the 4 surrounding sides, not up or down ones) made out of invisible textured brushes tied to a func_clip_physics entity. Check:
You can activate it only when the button is activated and deactivate it some secs later...
Other option would be a point_push/trigger_push with negative value to pull from the cube to the button and make it sit down straight quickly
Quote from FelixGriffin on November 4, 2012, 5:26 pmEnable trigger_pushes toward the center when the button is pressed?
Enable trigger_pushes toward the center when the button is pressed?
Quote from zivi7 on November 4, 2012, 5:43 pmWhen playing around with that portalable wall for our Halloween map, we thought about making it snap into position as well. Just like those HL2 "puzzles" where you have to collect batteries etc. According to the tutorials I found, the way those are done is by teleporters that teleport the item into place when brought close enough. Maybe that would work for your situation as well?
When playing around with that portalable wall for our Halloween map, we thought about making it snap into position as well. Just like those HL2 "puzzles" where you have to collect batteries etc. According to the tutorials I found, the way those are done is by teleporters that teleport the item into place when brought close enough. Maybe that would work for your situation as well?
Quote from LoneWolf2056 on November 4, 2012, 7:12 pmIn one of the example maps valve gives (sp_a4_laser_catapult), there is a trigger_multiple next to a button and when the cube gets close it triggers the button to be pressed in, helps save on accuracy.
In one of the example maps valve gives (sp_a4_laser_catapult), there is a trigger_multiple next to a button and when the cube gets close it triggers the button to be pressed in, helps save on accuracy.
Quote from josepezdj on November 5, 2012, 2:52 amBrainstone wrote:providing that the laser passing above the button would be deflected into the right direction.Hmmm... if what you need is the laser beam poiting to a given direction, even though when the cube has been positioned aiming to a different direction by the player, then I'd suggest you to make a change of cubes . Right in the moment the button is pressed you kill or SilentDissolve the original one and make a new one appear using a point_template and an entity_maker. This new cube should be hidden somewhere in the map and should be "into position" (with the desired direction you want it to have when spawned). Now place the point_template (with "template1" set to the new cube ofc) right on the button so the new cube appears right in there and heading the laser beam to the desired direction.
Hmmm... if what you need is the laser beam poiting to a given direction, even though when the cube has been positioned aiming to a different direction by the player, then I'd suggest you to make a change of cubes . Right in the moment the button is pressed you kill or SilentDissolve the original one and make a new one appear using a point_template and an entity_maker. This new cube should be hidden somewhere in the map and should be "into position" (with the desired direction you want it to have when spawned). Now place the point_template (with "template1" set to the new cube ofc) right on the button so the new cube appears right in there and heading the laser beam to the desired direction.
Quote from FelixGriffin on November 5, 2012, 7:54 amBe careful with that - it spawns things with their original offset. You'll want a point_template with the hidden cube, and an env_entity_maker on the button.
Be careful with that - it spawns things with their original offset. You'll want a point_template with the hidden cube, and an env_entity_maker on the button.
Quote from josepezdj on November 5, 2012, 11:34 amFelixGriffin wrote:Be careful with that - it spawns things with their original offset. You'll want a point_template with the hidden cube, and an env_entity_maker on the button.True, I mixed the entities! Sorry
True, I mixed the entities! Sorry
Quote from wrathofmobius on November 5, 2012, 7:14 pmIf you don't want to pick it up again, you could always use a prop_dynamic in the center of the button. Set a logic_auto to send the input TurnOff, then, once the cube reaches a trigger, send the input TurnOn and kill the cube.
EDIT: Wait, no, wouldn't work if you want a laser redirection cube. You could probably put something together with prop_weighted_cube using this method though.
If you don't want to pick it up again, you could always use a prop_dynamic in the center of the button. Set a logic_auto to send the input TurnOff, then, once the cube reaches a trigger, send the input TurnOn and kill the cube.
EDIT: Wait, no, wouldn't work if you want a laser redirection cube. You could probably put something together with prop_weighted_cube using this method though.
[spoiler]WOM Test 1
Laser Cube Quest
Mho' Power - Community Spotlight!
Four Corners[/spoiler]
Quote from josepezdj on November 6, 2012, 5:31 amwrathofmobius wrote:If you don't want to pick it up againIf you don't want to pick it up again there are many options even with a prop_weighted_cube set to reflector: for example parent it to an invisible func_physbox with mass above 30 (kg?) so the player cannot grab it... Other example would be to use a phys_constraint to limit the cube movement (I used it in here to avoid that the player could grab it but allowing the laser beam redirection on the X axis )
If you don't want to pick it up again there are many options even with a prop_weighted_cube set to reflector: for example parent it to an invisible func_physbox with mass above 30 (kg?) so the player cannot grab it... Other example would be to use a phys_constraint to limit the cube movement (I used it in here to avoid that the player could grab it but allowing the laser beam redirection on the X axis )