Here's how my level implementing Portal in Baba is You works! If you haven't seen it, here's a video: https://streamable.com/9pflr
Baba is You is a game played with the arrow keys. How can Baba fire a portal gun and still have the ability to walk around? The answer: there's one more button the game allows, and that's the wait button - which makes baba stand still and allows a turn to pass in the game world. In this level, the wait button does more than wait - it fires the portal gun.
The skull crosses are a gadget to activate an arbitrary rule when the wait button is pressed. The following rules are used to set it up:
FUNGUS MAKE BABA
BABA ON FUNGUS IS MOVE AND MOVE
BABA ON SKULL IS EMPTY