So, here is how I'm doing it... Will this work?
The MAIN object is setup to listen for messages from the buttons as follows
CODE
link_message(integer sender_num, integer num, string str, key id)
{
//This is triggered when a Child prim (a button) sends a message to this Prim (the main object)
if (str == "Category")
{
if (num == 1)
{
if (Category < Category_limit)
{
Category += 1;
}
else
{
Category = 0;
}
}
else
{
if (Category > 0)
{
Category -= 1;
}
else
{
Category = Category_limit;
}
}
}
else if (str == "Type")
{
if (num == 1)
{
if (Type < Type_limit)
{
Type += 1;
}
else
{
Type = 0;
}
}
else
{
if (Type > 0)
{
Type -= 1;
}
else
{
Type = Type_limit;
}
}
}
else if (str == "Variation")
{
if (num == 1)
{
if (Variation < Variation_limit)
{
Variation += 1;
}
else
{
Variation = 0;
}
}
else
{
if (Variation > 0)
{
Variation -= 1;
}
else
{
Variation = Variation_limit;
}
}
}
else
{
llWhisper(0, "Error in String sent from Child Object to Base Vendor Object.");
}
}//End Link_Message Event
Now, each button is setup to send a message as follows.
CODE
default
{
state_entry()
{
}
touch_end()
{
llMessageLinked(1, 1, "Type", "");
}
}
Basically, I'm using the 'int' and the 'str' from llMessageLinked to determine which button was hit, and I'm changing a global variable as needed.
The global variables are then looked at to determine what the vendor object should be showing.
Am I doing to prim to prim communcation right?