Jump to content
Sign in to follow this  
merlin

Setpos problem (teleport to roof)

Recommended Posts

I'm using a setpos script as a workaround for the non-functioning ladders of the hotel in chernagorsk, using the 'elevator' (flagpole inside by the elevator and flagpole on the roof that the player can teleport to and from)

i'm using Weasel's setpos script

_dir = random 359;
player SetPos [(getPos teleportDestination select 0)-1*sin(_dir),(getPos teleportDestination select 1)-1*cos(_dir)];
exit;

the script teleports me, however it teleports me to where the roof flag is, but at ground level. i think the scripting that moves the player away from the flagpole is responsible for this, could anyone help me out here, or if there is like a buildingpos command that i can use to get around the flagpole method.

thanks!

the roof is 39m up if thats any help

Share this post


Link to post
Share on other sites

I think you forgot the height element, try this but you mave have to tweak the height as I haven't tested it.

player SetPos [(getPos teleportDestination select 0)-1*sin(_dir),(getPos teleportDestination select 1)-1*cos(_dir),(getPos teleportDestination select 2)+39];

Share this post


Link to post
Share on other sites

worked perfectly, thanks for the quick reply!

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
Sign in to follow this  

×