CODUO Origin's.

Have questions about CoD/UO mapping that aren't covered in the tutorials section? Post here!

Moderator: Core Staff

Post Reply
Scorpion
CJ Wannabe
CJ Wannabe
Posts: 39
Joined: November 18th, 2007, 9:14 pm
Location: Burnley,United Kingdom

CODUO Origin's.

Post by Scorpion » September 19th, 2009, 4:05 pm

Hello

Im creating an Admin Room on my Map. Iv currently created a Button that makes everybody Teleport to a Certain Place.

I was Wondering is it Possible to Save Somebody's Origin on Teleport so when they Click another Button they get back to where they was Before they Got Teleported.

Im Guessing this is Possible, But dont know How to do it.

Thanks

User avatar
waywaaaard
Core Staff
Core Staff
Posts: 2214
Joined: February 6th, 2006, 3:18 pm
Location: Germany/Bayern

Re: CODUO Origin's.

Post by waywaaaard » September 19th, 2009, 8:37 pm

well isn't that hard

Code: Select all

save position of the player in a variable
...
player.oldPosition = player.origin;
player.oldAngles = player.angles;
...

here to set the player back to his old position
...
if(isDefined(player.oldPosition) && isDefined(player.oldAngles)){
	player setOrigin(player.oldPosition);
	player setAngles(player.oldAngles);
}
...
THAT HANDS WERE NOT TRACED!
visit my blog: Link
Soviet wrote:Yeah, watch out, Peds will hit you with his +5 D-Battleaxe of homosexuality :roll:

Scorpion
CJ Wannabe
CJ Wannabe
Posts: 39
Joined: November 18th, 2007, 9:14 pm
Location: Burnley,United Kingdom

Re: CODUO Origin's.

Post by Scorpion » September 19th, 2009, 9:30 pm

Ok Thanks!

Post Reply

Who is online

Users browsing this forum: No registered users and 36 guests