Thing_ChangeTID
From ZDoom Wiki
176:Thing_ChangeTID (oldtid, newtid)
oldtid: The current TID of the thing who's TID will be changed. newtid: The new TID that the thing will be changed to.
If oldtid is zero, then whatever activated the script will have its TID changed to newtid. If oldtid is non-zero, then everything with the TID oldtid will have their TID changed to newtid.
One of the primary uses for this special is to give a player a TID using a script like this:
script 100 enter
{
Thing_ChangeTID (0, 1337+PlayerNumber());
}
This will give player 1 the TID 1337, player 2 the TID 1338, player 3 the TID 1339, and so on.
Use this script for multiplayer levels:
Script 256 Respawn
{
Thing_ChangeTID(0, PlayerNumber()+256);
}
Script 257 Death
{
Thing_ChangeTID(0, 0);
}
Script 258 Enter
{
Thing_ChangeTID(0, PlayerNumber()+256);
}
This will give player 1 the TID 257, player 2 TID 258, etc. It will cause each player not to have a TID during death.

