Andy Murtagh
New Member
Hi guys,
Need a little bit of help with the syntax of a variable definition. Later in a script that I use I have the following:
I utilise this to teleport a recently kicked player that went somewhere they shouldn't have away from where they were. At present, as you can see, it's hard-coded in the script body to teleport them to Balota. What I'd like to do is use a variable there instead, in case people want the option of sending them elsewhere; so something like:
That's fine, but what I'm not sure of is the syntax to set _destination earlier in the script. Is it as simple as:
I want to be able to use _destination to hold the coordinate location of where the player will be moved to, can any confirm what the syntax for this should be? Trial and error may win out, but I thought I'd see about saving myself some time
As an aside, anyone know of a way to decide on a random location and set _destination to it?
Thanks!
Q.
Need a little bit of help with the syntax of a variable definition. Later in a script that I use I have the following:
Code:
player setPos [4676.18,2509.28,0.001];
I utilise this to teleport a recently kicked player that went somewhere they shouldn't have away from where they were. At present, as you can see, it's hard-coded in the script body to teleport them to Balota. What I'd like to do is use a variable there instead, in case people want the option of sending them elsewhere; so something like:
Code:
player setPos _destination;
That's fine, but what I'm not sure of is the syntax to set _destination earlier in the script. Is it as simple as:
Code:
_destination = [4676.18,2509.28,0.001];
I want to be able to use _destination to hold the coordinate location of where the player will be moved to, can any confirm what the syntax for this should be? Trial and error may win out, but I thought I'd see about saving myself some time
As an aside, anyone know of a way to decide on a random location and set _destination to it?
Thanks!
Q.