Unity 3D and Playmaker - Making Jelly Sheep puzzle pieces that will move opposite of player
In this tutorial, I will set up little Jelly Sheep. We will set them up as prefabs and have those Jellies move the opposite of the player moves as beginnings of a puzzle game. Also check out How to Make a Bounce Game Series https://bit.ly/39HIYBU. //TIMESTAMPS 0:00 Introduction 0:30 Explaination
This puzzle-game tutorial adds a jelly sheep character that moves in the opposite direction from the player, turning simple grid movement into a herding puzzle. Rather than rebuild movement from scratch, you reuse the player's FSM states, convert them to global transitions, and have the player broadcast its moves so any number of jellies respond in reverse.
Build the jelly object
Create an empty named jelly sheep, match its Y to the player's (around 1.376), and add a thin cylinder base scaled to about 0.3 wide and 0.01 tall, with the jelly model sitting on top. Snap it to the grid, which is built on half-unit steps, so its X and Z land on values like 0.5 and negative 0.5, centered on a tile.
Reuse the player's movement states
Copy the player's movement states into a new FSM on the jelly named jelly movement. Delete the player-input actions since the jelly will not read keys directly. Rename and set Move Back, Move Forward, Move Left, and Move Right as global transitions so they can be triggered remotely, and add a clean Idle start state. Remove leftover stop-movement and finished transitions so the jelly only moves when explicitly told.
Sync the jelly's starting position
Because the copied states assume a start at 0,0, the jelly's position variables will be wrong. In Idle, use Get Position to read the jelly's actual placement and update its X and Z variables once at start. Verify in the variables panel that the values match where you placed it before moving on.
Broadcast moves from the player
In the player's FSM, add Send Event By Name to each move state with the event target set to Broadcast All, so every jelly's global transitions hear it. Invert each direction: when the player moves back, send move forward; player right sends jelly left; player forward sends jelly back; player left sends jelly right. Because it is a broadcast, one player move drives every jelly on the board at once. Save the jelly as a prefab and drop several onto the grid, snapping each to the half-unit positions, and the whole flock moves opposite the player, creating the puzzle.





