First of all, this section is dedicated to mod developers and people who are familiar with programming and already have some understanding of TorqueScript. I can't explain in full extent, it would be way too much.
This code snippet is just an example to show how you can trigger a custom function whenever a player enters the world. It has no actual use in this state.
You would preferably put custom scripts in a new .cs file and include it the same way you include TTmod, by using the exec() function with the path to your file.
If you are interested in developing own mods, check out the Torque3D reference at Garagegames:
http://docs.garagegames.com/torque-3d/r ... index.html