‘New Player’ Callbacks....

1
Hello again, this time I have a doubt with this script.

I'm reading the Modding Resources For Developers section, and I see this script ....

Code: Select all

function my_callback(%client) {
    centerprintall("Character ID " @ %client.player.getCharacterId() @ " has entered the world!", 8);
}
TTmod_registerPlayerEnterCallback("my_callback");
The question is that I do not know where to put or edit this sentence or others. I have to edit some file, or on the contrary I have to add it ?.

Thanks again.

Re: ‘New Player’ Callbacks....

2
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