Affect all ingame players with SetActorPosition

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!)
User avatar
TheGameratorT
Posts: 63
Joined: Sun Mar 04, 2018 4:42 am
Graphics Processor: nVidia with Vulkan support
Location: Portugal

Affect all ingame players with SetActorPosition

Post by TheGameratorT »

I wonder if it's possible to teleport all players to a specific local using this script:

Code: Select all

SetActorPosition(0, GetActorX(2), GetActorY(2), GetActorZ(2), true);
I also tried to assign TIDs to players and use:

Code: Select all

script 1 enter
{
    Thing_ChangeTID(0, PlayerNumber()+1000);
}

Script 2 (void)
{
    SetActorPosition(1000, GetActorX(2), GetActorY(2), GetActorZ(2), true);
    SetActorPosition(1001, GetActorX(2), GetActorY(2), GetActorZ(2), true);
    SetActorPosition(1002, GetActorX(2), GetActorY(2), GetActorZ(2), true);
    SetActorPosition(1003, GetActorX(2), GetActorY(2), GetActorZ(2), true);
    SetActorPosition(1004, GetActorX(2), GetActorY(2), GetActorZ(2), true);
    SetActorPosition(1005, GetActorX(2), GetActorY(2), GetActorZ(2), true);
    SetActorPosition(1006, GetActorX(2), GetActorY(2), GetActorZ(2), true);
    SetActorPosition(1007, GetActorX(2), GetActorY(2), GetActorZ(2), true);
}

script 256 respawn
{
    Thing_ChangeTID(0, PlayerNumber()+1000);
}

script 257 death
{
    Thing_ChangeTID(0, 0);
}
But didn't worked either :(
User avatar
TheGameratorT
Posts: 63
Joined: Sun Mar 04, 2018 4:42 am
Graphics Processor: nVidia with Vulkan support
Location: Portugal

Re: Affect all ingame players with SetActorPosition

Post by TheGameratorT »

I ended up finding this solution being TeleportOther :)

Return to “Scripting”