CODE
integer listPos; // Just to be sure I wasn't mising something... all main variables are now global.
vector targetPos;
integer channel = -10;
list avatarsDetected = [ ];
list keysDetected = [ ];
list posDetected = [ ];
string Gname;
string tool;
integer nextStep;
string nextAvatarName;
string nextAvatarKey;
vector nextAvatarPos;
string menuText = "Select the person to receive surprise coupon!!";
useKey(key targetKey)
{
//Just wanted to check my data, and lo and behold.. no targetPos...
llSay(0,(string)targetKey); //Returns valid key
llSay(0,(string)targetPos); //Returns <0,0,0> everytime no matter who you pick
llSay(0,(string)listPos); //Returns position in list (as far as I can tell it must be right since name and key match
llSay(0,Gname); //Returns correct name when clicked on Dialog Menu
//Since I got it working I thought it would be cool to rez a "coupon" next to a customer
//that would be of just whoever one randomly chose to be the lucky person that could get
//a full sale copy of an item in the store or something... kind of draw attention to things, etc.
//---You could even oversize your sale panel for a big effect ;) I really like this idea the more
//I thought on it....
}
default
{
state_entry(){
llListen(channel, "", llGetOwner(), "");
}
link_message(integer sender_num, integer num, string str, key id)
{
if (str == "GetCustomer"){
llSensor("", NULL_KEY, AGENT, 30, PI);
}
}
listen(integer channel, string name, key id, string message)
{
Gname = message;
listPos = llListFindList(avatarsDetected, (list)message);
targetPos = llList2Vector(posDetected, listPos);
useKey(llList2Key(keysDetected, listPos));
}
sensor(integer numDetected)
{
if (numDetected > 12) numDetected = 12;
avatarsDetected = [ ];
keysDetected = [ ];
posDetected = [ ];
for (nextStep = 0; nextStep < numDetected; nextStep++)
{
nextAvatarName = llDetectedName(nextStep);
nextAvatarKey = llDetectedKey(nextStep);
nextAvatarPos = llDetectedPos(nextStep);
if (llStringLength(nextAvatarName) > 24) nextAvatarName = llGetSubString(nextAvatarName, 0, 23);
avatarsDetected = (avatarsDetected=[]) + avatarsDetected + nextAvatarName;
keysDetected = (keysDetected=[]) + keysDetected + nextAvatarKey;
posDetected = (posDetected=[]) + posDetected + (string)nextAvatarPos;
}
llDialog(llGetOwner(), menuText, avatarsDetected, channel);
}
}
Basically, I've gone a step further now... I make little dragonflies and such and thought hey, how cool would it be if every so often one of the followers could "go" to a customer and rez the item they won, Say congratz and whatnot then die in a little poof of particles? I mean I think especially newcomers would get a HUGE kick out of that. (can you tell I am? lol) Anyway, if it's just not doable lemme know, but I figure if a follower can follow me, surely it could follow someone else if I already have their key and name?
C-ME!
-Hap
string)" typecast, or changing to "targetPos = (vector)llList2String(posDetected, listPos);".

;