Jump to content
Search In
  • More options...
Find results that contain...
Find results in...
Sign in to follow this  
Chainsaw

Get player position

Recommended Posts

This just returns the co-ordinates of the thing with the given Thing ID. Is it possible to give a thing ID to a player?

Share this post


Link to post

The following script should teleport you every 5 seconds back to where you just teleported from. TID's 2 and 3 are ZDoom map spots. I cannot make them move and take the place of the player was. The player always teleports to where they are placed on the map. I have also tried it with teleport destinations with the same effect:

script 1 (void)
{
int destID = 3;
int leftID = 2;
Thing_ChangeTID(0, 1);
while(1)
{
TeleportOther(leftID, 1,0);
TeleportOther(1, destID, 1);
if(destID == 2)
{
destID = 3;
leftID = 2;
}
else
{
destID = 2;
leftID = 3;
}
delay(5 *35);
}
}

I have also tried Thing_Move, but again to no avail.
any ideas?

Share this post


Link to post

I don't think you can teleport map spots. Every 5 seconds just delete the spot with Thing_Remove and make a new one with Spawn at the player coords or whatever it is you're doing.

Share this post


Link to post

Well, I finally got it doing what I wanted using THing_move(). it even works with map spots, but for some reason it wont move an object to you if you're standing next to a wall.

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  
×