Please or Register to create posts and topics.

cube auto-snap to button

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?

The Aperture Alpha
A map pack coming soon. - click for more information
Image

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:

Spoiler
Sorry, only logged-in users can see spoilers.

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

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

Enable trigger_pushes toward the center when the button is pressed?

Falsi sumus crusto!

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?

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.

Brainstone 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 :D. 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.

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

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.

Falsi sumus crusto!
FelixGriffin 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 :-?

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

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.

Released Maps
[spoiler]WOM Test 1
Laser Cube Quest
Mho' Power - Community Spotlight!
Four Corners[/spoiler]
wrathofmobius wrote:
If you don't want to pick it up again

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 :wink: )

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