bonjour
I tried to ask about this in the chat but it got swamped by people talking about the contest. I doubt anyone will have any clue about this but here goes.
I'm making a HL2 puzzle which looks like this:
There's two doors which are closed by default. The player has to get to the other side of these doors. They have to use a crate and a two-plug cable which looks like this:
There are three sockets and you can connect the cable's plugs into any of them.
What I'm having trouble with is setting it up so that combinations of different sockets has different outputs. For example, if the player connects the left socket and the power socket on the other side, the left door will open. If the player connects the right socket and the power socket, the right door will open. What the player has to do is open the first door, block it with the crate and then open the other door to ensure both doors are open at the same time. Sounds simple right?
Here's what it would look like ingame when solved, with the far door connected to be open and the closest door blocked with the crate:
My initial assumption was to use math_counters to determine which sockets had a plug in them and which didn't. These are the outputs of a trigger_multiple in a socket which detects if an end of the cable is in. (There are two in each socket, one to detect either end of the cable).
When a plug is connected to the socket, it adds a unique number to the math_counters and subtracts the same number when removed. One socket adds/subtracts 3, the second adds/subtracts 5 and the last one adds/subtracts 7. By reading the sum of the numbers, you can tell which sockets are connected.
Doorcombocounter10 is a math_counter which checks if the left socket (3) and the power socket (7) are connected because it reaches its max legal value (10) and sends and output to open the left door.
Doorcombocounter12 is a math_counter which checks if the left socket (5) and the power socket (7) are connected because it reaches its max legal value (12) and sends and output to open the right door.
So what am I doing wrong? When I connect the plugs ingame, nothing happens. The doors don't move at all. Also I have no idea how to make it so you can take a plug out of a socket again. Also one end of the plugs floats away from the cable rather than anchoring to it for some reason. I textured them red ingame in the download so you can see them if they drift off or something.
If anyone thinks they can help me with this then I'd be very grateful. Here's a dropbox link to the VMF and the BSP if you think you can get it to work:
https://www.dropbox.com/s/pfyfcc7kads206m/corvas plug puzzle.rar?dl=0
pls
I tried to ask about this in the chat but it got swamped by people talking about the contest. I doubt anyone will have any clue about this but here goes.
I'm making a HL2 puzzle which looks like this:
There's two doors which are closed by default. The player has to get to the other side of these doors. They have to use a crate and a two-plug cable which looks like this:
There are three sockets and you can connect the cable's plugs into any of them.
What I'm having trouble with is setting it up so that combinations of different sockets has different outputs. For example, if the player connects the left socket and the power socket on the other side, the left door will open. If the player connects the right socket and the power socket, the right door will open. What the player has to do is open the first door, block it with the crate and then open the other door to ensure both doors are open at the same time. Sounds simple right?
Here's what it would look like ingame when solved, with the far door connected to be open and the closest door blocked with the crate:
My initial assumption was to use math_counters to determine which sockets had a plug in them and which didn't. These are the outputs of a trigger_multiple in a socket which detects if an end of the cable is in. (There are two in each socket, one to detect either end of the cable).
When a plug is connected to the socket, it adds a unique number to the math_counters and subtracts the same number when removed. One socket adds/subtracts 3, the second adds/subtracts 5 and the last one adds/subtracts 7. By reading the sum of the numbers, you can tell which sockets are connected.
Doorcombocounter10 is a math_counter which checks if the left socket (3) and the power socket (7) are connected because it reaches its max legal value (10) and sends and output to open the left door.
Doorcombocounter12 is a math_counter which checks if the left socket (5) and the power socket (7) are connected because it reaches its max legal value (12) and sends and output to open the right door.
So what am I doing wrong? When I connect the plugs ingame, nothing happens. The doors don't move at all. Also I have no idea how to make it so you can take a plug out of a socket again. Also one end of the plugs floats away from the cable rather than anchoring to it for some reason. I textured them red ingame in the download so you can see them if they drift off or something.
If anyone thinks they can help me with this then I'd be very grateful. Here's a dropbox link to the VMF and the BSP if you think you can get it to work:
https://www.dropbox.com/s/pfyfcc7kads206m/corvas plug puzzle.rar?dl=0
pls