Thing_ChangeTID to give Player unique TID - doesn't work :(

Ask about ACS, DECORATE, ZScript, or any other scripting questions here!

Moderator: GZDoom Developers

Forum rules
Before asking on how to use a ZDoom feature, read the ZDoom wiki first. If you still don't understand how to use a feature, then ask here.

Please bear in mind that the people helping you do not automatically know how much you know. You may be asked to upload your project file to look at. Don't be afraid to ask questions about what things mean, but also please be patient with the people trying to help you. (And helpers, please be patient with the person you're trying to help!)
Post Reply
User avatar
Cherno
Posts: 1311
Joined: Tue Dec 06, 2016 11:25 am

Thing_ChangeTID to give Player unique TID - doesn't work :(

Post by Cherno »

:3:

In my ACS script, I want to save the player's TID in a variable so I can check his health later on.

Hence, I copied the sample script from the PlayerNumber article on the wiki.

Code: Select all

int playerTID = 0;

script 1 ENTER
{ 
	playerNum = Thing_ChangeTID (0, 1000+ PlayerNumber());
	print(i:playerNum);
}
Yet, it always prints "1" when I load a level.
User avatar
KeksDose
 
 
Posts: 595
Joined: Thu Jul 05, 2007 6:13 pm
Contact:

Re: Thing_ChangeTID to give Player unique TID - doesn't work

Post by KeksDose »

The function seems to return 1 if the tid was successfully changed. If you print ActivatorTid(), it'll show the right one.
Post Reply

Return to “Scripting”