Welcome to the Second Life Forums Archive

These forums are CLOSED. Please visit the new forums HERE

llMapDestination (help!)

SqueezeOne Pow
World Changer
Join date: 21 Dec 2005
Posts: 1,437
12-09-2008 15:41
So I'm working on a HUD that cycles through a list of locations and their region and coordinates. I want to be able to click on the item when I'm at a location I want to go to and have it bring up the map so I can TP there.

I'm able to make llMapDestination("<sim_name>", <x,y,z>, ZERO_VECTOR); work when I type in a specific region and coordinates but when I try to get it to read from the list it ends up having problems with ZERO_VECTOR for some reason. Here's what I see...

list location = ["the Painted Lady", "Squeeze One Plaza v.2"];
list coordinate = ["<232,247,30>", "<225,321,60>"];
list region = ["Gualala", "Gualala"];

((script stuff to cycle through the list. This works fine))

touch_start(integer total_number)
{
current_location++;
if(current_location >= llGetListLength(location))
current_location = 0;
llSetTimerEvent(3);
llMapDestination("" + llList2String(region, current_location)+ "", "" + llList2String(coordinate, current_location)+"", ZERO_VECTOR);
}
}

...but it gives the "number of arguments" error for ZERO_VECTOR. According to everything I can find in the wiki this should work. Help!
_____________________
Semper Fly
-S1. Pow

"Violence is Art by another means"

Visit Squeeze One Plaza in Osteria. Come for the robots, stay for the view!http://slurl.com/secondlife/Osteria/160.331/203.881
Argent Stonecutter
Emergency Mustelid
Join date: 20 Sep 2005
Posts: 20,263
12-09-2008 15:52
It looks like you're trying to convert the coordinate to a string and appending it to the first argument, instead of treating it as a vector as the second argument.

That is, you're calling:

llMapDestination(string+string,vector);

Instead of

llMapDestination(string,vector,vector);

...

Try this:

list location = ["the Painted Lady", "Squeeze One Plaza v.2"];
list coordinate = [<232,247,30>, <225,321,60>]; // vectors, not strings
list region = ["Gualala", "Gualala"];

((script stuff to cycle through the list. This works fine))

touch_start(integer total_number)
{
current_location++;
if(current_location >= llGetListLength(location))
current_location = 0;
llSetTimerEvent(3);
llMapDestination(
llList2String(region, current_location),
llList2Vector(coordinate, current_location),
ZERO_VECTOR);
}
}
_____________________
Argent Stonecutter - http://globalcausalityviolation.blogspot.com/

"And now I'm going to show you something really cool."

Skyhook Station - http://xrl.us/skyhook23
Coonspiracy Store - http://xrl.us/coonstore
Jesse Barnett
500,000 scoville units
Join date: 21 May 2006
Posts: 4,160
12-09-2008 17:27
You might want to look at using slurls instead of llMapDestination. I find it much more convenient. Just have your hud chat the slurl and click on it in chat history.

Might be a little too much extra stuff to sift through here but this is how I do it. Just concentrate on the add destination state and this section in state default to see how the destinations are formatted and the sim name uses llEscapeUrl & llUnescapeUrl:

else if (llListFindList(destinations,[msg]) != -1) {


https://wiki.secondlife.com/wiki/User:Jesse_Barnett/Slurl_TP_HUD
_____________________
I (who is a she not a he) reserve the right to exercise selective comprehension of the OP's question at anytime.
From: someone
I am still around, just no longer here. See you across the aisle. Hope LL burns in hell for archiving this forum