SocialExposure.jsx
. However, nothing will show if we don't have any other players!admin panel
and to the configuration
section.playerCount
(following the same procedure as before) with more than one player, then creating a new treatment and a new batch. New Player
in the header tab. The game will start once the required number of players have entered the lobby.server/main.js
round
are multiple stages
. We can add more stages by returning to the Empirica.gameInit
method and adding the following after the other roud.addStage
part.server/main.js
file looks like this:Round.jsx
to display the SocialExposure
component only when stage.name === "social"
. <SocialExposure {...this.props} />
part with this code:Round.jsx
file looks like this:SocialExposure.jsx
.player.set()
and displaying that information in the SocialExposure
component, the participant's interface is automatically updated. This is due to the way React.js works with Meteor: any time a piece of information passed as one of the props is updated, then the display re-renders to show the new information.player.get("neighbors")
. Let's do this by replacing the declaration for const otherPlayers
with:otherPlayers
to players that are not the current player and players that are in the current player's neighbors (their node is in their list of neighbors).SocialExposure.jsx
component should look like this:admin panel
by navigating to the factors interface and clicking "New Factor". stageLength
factor of type Integer
. You need to add a little description, but you do not need to specify a minimum or maximum.Required
so that it has to be entered when creating treatment. Otherwise, if you forget to set a stageLength
, the experiment will break.stageLength
, to avoid being tempted to use them and declutter your interface. You'll always be able to unarchive these if necessary.60
, for 60 seconds).Empirica.gameInit
callback. In server/main.js
, go to the part where stages are added to the round, and change the durationInSeconds: 120
to durationInSeconds: game.treatment.stageLength
for both stages.stageLength
factor that is longer and make a 'test' or 'dev' treatment with this factor that's just for you when you want to do some long edits.Configuration
on the admin panel (where you create Treatments and Factors) and click the Export
button. This will allow you to download a .yaml
file of your Treatments and Factors. Add it to the root of your Empirica experiment folder (or somewhere else where it is handy to access). It can be good to rename it to something like factors.yaml
.Configuration
on the admin panel, click Import
and select your .yaml
file.