Player number in Fraggle/LegacyScript

Question

In multiplayer, how do I get the player number, so I can refer to it in code?

I'm trying to make a linedef that only teleports player 1 elsewhere when it's crossed. Ideally it'd only be activated by player 1, but that's optional right now.

I've tried a "print(player);" and "print(playerobj)" and "print(trigger);", but player and playerobj just gives me crazy numbers, which are the same to both players in multiplayer, and trigger just gives me the "doomplayer" string.