Skip to content

Groups and teams

ActualityPI has no built-in idea of a team. You build one from an entity template for the groups and a relationship that links people to them. The same pattern works for departments, tables, cohorts, or anything else people belong to.

  • A Team entity template, one entity per team.
  • A Person entity template, one per person taking part.
  • A Member of relationship from each person to their team.
  1. Create the teams. Add an entity template called Team. Set Initial instances and Maximum instances to the number of teams, and Who controls it to Nobody.
  2. Create the people. Add an entity template called Person, with enough instances for everyone. Set Who controls it to Participants claim or Operators assign.
  3. Link them. Add a relationship called Member of, and tap the pills in its sentences until they read:
    • Member of links a Person to a Team. Tap each anyone, tap Add a condition, and change the clause to is a kind: Person for the start of the link, Team for the end.
    • Each Person has at most 1 Member of link going out, so each person is in one team. Tap any number of, choose At most and enter 1.
    • Each Team has … Member of links coming in: choose At most and the most people a team can have, or leave Any number for no limit.

Choose one of these:

  • Fixed teams. Save the relationship, then tap Add a starting link… and build links such as Person #0 has Member of to Team #0, tapping Add after each one. Whoever controls each person is in that team.
  • People choose. Give each team a QR code. Add an action Join team whose sentence reads Any Person may use Join team on 1 target, a Team. Tap Anyone and anyone, and choose is a kind for each. Add the effect Create a relationship, so it reads Make Member of from the performer to the target. Give the action to Person in its Actions card. People join by scanning their team’s code. Joining fails if the team is full or the person is already in a team.
  • At random. See Random assignment.

To make sure everyone has a team before the scenario starts, add an activation requirement: Every entity has relationships, for Person, with Member of and Minimum outgoing 1.

  • Only your own team. For an action aimed at a Team, tap its target pill, tap Add a clause, choose has a link to, and make it read the performer has Member of to each one. The new clause starts the other way round, so check the two sides. The action’s sentence then ends a Team they have Member of to.
  • Same team, or a different team. For an action aimed at another Person, add a has a link to clause to its target rule that reads each one has Member of to the one the performer has Member of to: tap the performer and add the hop Member of → after it. That means “in the same team as whoever performs it”. Choose has no instead of has for “in a different team”. This needs at most 1 Member of link going out.
  • Team scores. Give Team a number attribute, and change it from each member’s actions. See Counters and scores.
  • Seeing who’s in each team. The scenario’s runtime lists relationships under Relationships, and each entity’s page lists its own under Relationships too.