How do you hook multiple Triggerzones up to a single Respawn Pad in Rec Room?
1. Simple addition, ignoring edge cases
You can just add the trigger zone outputs up, using an addition chip, and wire that directly to the respawn point.
Edge cases: If multiple people enter different trigger zones in the same circuit tick, it will respawn neither. If there happens to be a player with the sum of the player IDs of the entering players in the room, it will respawn that player instead.
Example: Two players with IDs 1 and 2 enter two different trigger zones at the same time, the sum 3 will be forwarded to the respawn. If there happens to be a player with ID 3 in the room, that player will be respawned.
In many cases, that is good enough. For example if you don't have multiple people in the room at the same time, or if it is extremely unlikely that 2 enter different zones at the same time. Also note this solution does not guarantee that a player who touches the zone will always be respawned.
2. Repawn chips, for certain situations
You can connect each trigger zone directly to a respawn chip. The respawn chip will do its magic and select a respawn point according the rules specified in the respawn point and game rule chip configuration. If you can live with a single spawn point, or manage players team, or the spawn point teams, or both, in such a way that only the spawn points you want the player to go to are considered, this is the way to go.
Also note that you can use checkpoints to make the game prefer a specific spawn point.
3. Roles
- Create a new role, indicating that you want to queue the player for respawn.
- Assign that role when a player enters a trigger zone, one assign role chip per zone.
- Listen to role changes (role assignment chip in role changed mode). On role change, check if the player has the to-respawn role. If he has, remove the role and respawn the player.
The drawbacks here are that it might be a little slower than 1. The more role changes you have going on during the game, the worse this gets. Many chips have a buffer of 20 events they can output, anything else gets lost. This is probably true for the role changed chip as well (I don't actually know that). The more of these systems you set up, the more roles and role changes you have, so losing events gets more likely. Removing the role again, dying, and being revived are all role changes too, and add to this problem.
4. Buffer Chip
- Head over to canny and vote on the Buffer Chip.
- Wait until it is implemented.
- Use it instead of the addition chips in 1.
The only drawback here is having to wait. :)
I guess there are at least 2 ways:
Assuming that only one trigger zone will fire at any clock tick, you can just add the output of the red pins of the trigger zones and pass the sum into the respawner.
To deal with cases where the same player can potentially trigger two triggerzones at the same time: connect the red pin of the first triggerzone to the red and cyan input pin of an unequal comparer chip in advanced mode; set the green input pin of that comparer to 0 and connect the red pin of the second triggerzone to the purple input pin of the comparer. Add the two output pins of the comparer and connect the sum to the respawner. (The idea is that the respawner uses the output of the first triggerzone if that is unequal to 0, otherwise it uses the output of the 2nd triggerzone.) For more than 2 triggerzones, you can build a chain with additional comparerers and add chips.