Page 1 of 1

Request for "z" adjustment script.

Posted: Sat Mar 04, 2006 6:16 pm
by stranf
What I'm going to do is attach a script to a rope that sets the "z" coordinate value to -20, and then a different script to set it back to 0.

What are the functions nessecary for this? (I'm sure it's so easy, someone could code it in this message.)

Anyway, I don't have a lot of free time today, so if someone could whip it out, that'd be cool.

The tunnels under the jails in Yew, and the caverns under bucs den are all at a z value around -20, and begin at 0, if you could attach the "z adjustment" script to a rope or object, these areas would now be accesible to pcs. Thanks!

Posted: Sat Mar 04, 2006 6:27 pm
by Grimson
To change a players position use the teleport function: https://www.uox3.org/jsdocs/common.html#SE_Teleport

Posted: Sat Mar 04, 2006 6:34 pm
by stranf
Thanks. This script requires the x, and y, corrdinates. is that set off by currentx? IE, for a "down" script it would be:

Code: Select all

mChar.Teleport( mChar.currentx, mChar.currenty, -20 );
If that's valid syntax I'm good to go! Thanks a ton!
[/code]

Posted: Sat Mar 04, 2006 6:37 pm
by Grimson
stranf wrote:Thanks. This script requires the x, and y, corrdinates. is that set off by currentx? IE, for a "down" script it would be:

Code: Select all

mChar.Teleport( mChar.currentx, mChar.currenty, -20 );
If that's valid syntax I'm good to go! Thanks a ton!
The propertys are ".x" and ".y", you should really use the JS documentation at: https://www.uox3.org/jsdocs/index.html