Sign in to follow this  
Followers 0

(solved) give 2 player1s (real & dummy) different tid

I want a normal player1 and a dummy player1 to have 2 TIDs so I can print how close they are on x/y axis.

I tried this from the zdoom wiki:

Script 4 ENTER
{
    Thing_ChangeTID(0, 1000 + PlayerNumber()); // This assigns the TID
    print(d: 1000 + playernumber());
    delay(100);
}
But now they both have the TID of 1000 because they both entered to trigger that. So I erased that script, and manually gave both player1s a tag under the action menu. That doesn't seem to give them tids though (thrustthingz didn't work on either of them).

Share this post


Link to post

Maybe have a Thing Enters Sector or similar in the voodoo doll's sector, which executes a different TID-assigning script?

Share this post


Link to post

That worked. I put dummy player1 in a sector with wind to make him walk over a line that triggers script 2 which changes his tid (wind because I can't thrust him over the line since he has no tid to thrust at the beginning).

#include "zcommon.acs"

//this only happens once I think, despite there being 2 player1s
script 1 enter
{
    thing_changetid(0,1000);
}

//put dummy player1 on dummy sector 
//with wind to make him walk over line that acs_executes this script
script 2 (void)
{
    thing_changetid(0,1001);
}

//now they both have a tid and both jump
script 3 open
{
    delay(70);
    thrustthingz(1000,128,0,0);
    thrustthingz(1001,128,0,0);
}

Share this post


Link to post

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0