Have a Sim fall asleep on the floor. Enable the move_objects on code and move the Sim under the bed while sleeping. When they get up, they cannot move anywhere unless you move them again or move the bed.
First, greet someone or call someone you know. Enable the move_objects on code and move the Sims into a bed, so their body is intersecting the bed and their feet are on the bottom. They are now stuck. To free them, enter build mode, click on the hand tool, and move them. While he or she are stuck in the bed they cannot talk, unless they were talking before.
Enable the move_objects on code. Make a toilet. Move your Sim into the toilet and continue the game. Your Sim will be helplessly trapped in the toilet and cannot escape.