I've been scouring the Wiki for awhile now, and I just cant find the answer to my questions.
A) How would one go about automatically assigning a player a specific TID without having them activate a script by running over a line or clicking a button. I.E. When a player joins the game can I give Player 1 a TID of 3 and Player 2 a TID of 7?
B) If there is a way of doing part A, is there a way for me to retrieve what player 1's TID is?
A few ACS Questions
Forum rules
Before asking on how to use a ZDoom feature, read the ZDoom wiki first. This forum is archived - please use this set of forums to ask new questions.
Before asking on how to use a ZDoom feature, read the ZDoom wiki first. This forum is archived - please use this set of forums to ask new questions.
Using an ENTER script with "Thing_ChangeTID(1337+PlayerNumber());" will give players 1, 2, 3, and 4 the TIDs 1337, 1338, 1339, and 1340, respectively. From there you can use an If statement in your script to check which player activated it (ActivatorTID and the like). Should work with a bit of tweaking.
And 1337 is just an arbitrary number. Remember to put *something* there though, as PlayerNumber() starts at 0 and there's no such thing as a TID of 0.
And 1337 is just an arbitrary number. Remember to put *something* there though, as PlayerNumber() starts at 0 and there's no such thing as a TID of 0.
You've got it wrong. Thing_ChangeTID uses two parameters.
Thing_ChangeTID(0, 1337 + PlayerNumber()); would be correct.
(The first 0 would mean whoever activated the script)
To make keep track of things easier, I suggest using more simple numbers like 1001 instead of 1337.
In that case, player 1's TID will be 1001, player 2's will be 1002, etc. Easier to read.
Thing_ChangeTID(0, 1337 + PlayerNumber()); would be correct.
(The first 0 would mean whoever activated the script)
To make keep track of things easier, I suggest using more simple numbers like 1001 instead of 1337.
In that case, player 1's TID will be 1001, player 2's will be 1002, etc. Easier to read.
Thanks for the help, but now I have another question.
Would I be able to store a player's TID as a variable for me to reference throughout the game?
For example, say I defined the variables player1tid and player2tid, and then I wanted to check what player1's TID and player2's TID was, then match them up with a repeating ThingHate script. Similar to making teams via ACS, but with a little more freedom and "Zazz"
Or could I simply define TID's via playerclasses?
Would I be able to store a player's TID as a variable for me to reference throughout the game?
For example, say I defined the variables player1tid and player2tid, and then I wanted to check what player1's TID and player2's TID was, then match them up with a repeating ThingHate script. Similar to making teams via ACS, but with a little more freedom and "Zazz"
Or could I simply define TID's via playerclasses?