Help Making a 'Prisoners Dilemma' Multiplayer System

I’m still getting to grips with multiplayer replication and server/client relationships, but I am finding it difficult to create a multiplayer system that utilises elements from the Prisoners Dilemma (The Prisoner's Dilemma - YouTube).

In theory, the player would walk into either a blue ‘ally’ box or a red ‘betray’ box and depending on what box the other player went into, health points will be allocated accordingly. (I have drawn up a diagram which I’ve attached.

The main issue is I do not know how to directly reference specific players/clients within the blueprint. I would appreciate some info on how I would go about this generally or where I should start.


Hi @simonkelly

For example,
Lets say you make an actor with 4 triggetboxes ,and set up all the OnActor begin overlap(Triggetbox1,2,3,4).
Pin out the OtherActor, and if you are using pawns, you will need to use a node to get the player controller of the pawn
Now set a variable to store this info like an array of int.
So the index are the players and the stored number are the triggerbox they are in.
If player 1 entered the trigger 4, set array elem index 1 to 4.

When they leave the trigger , set the relative array index to 0.

Now whenever you want you can start a custom evento to make a loop check. for the array and define the correct output for every combination you need.

Making this an actor you can also spawn it only on the server,
or use "Has Authority node "to make it work only on the server.