Page 1 of 1

CODUO Origin's.

Posted: September 19th, 2009, 4:05 pm
by Scorpion
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

Re: CODUO Origin's.

Posted: September 19th, 2009, 8:37 pm
by waywaaaard
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);
}
...

Re: CODUO Origin's.

Posted: September 19th, 2009, 9:30 pm
by Scorpion
Ok Thanks!