ThugLatino Bling
Registered User
Join date: 6 Jun 2005
Posts: 5
|
09-06-2005 20:56
i have taken a free vendor from yadnis place,but i just wanted to make my own custom vendor not selling the vendor just for personal use,but my question is how do i link the darn thing,the next button and the prev button link last first the main vendor script first or last? nothing is working for me.what to do what to do please help.
|
a lost user
Join date: ?
Posts: ?
|
09-07-2005 03:26
That would entirely depend on the script.. however in most cases you will have the Main Panel as the last selected prim (the parent prim) with the other two prims for next and previous buttons. You'd normally have all of the main functions in the Main Panel prim and then simply have link messages in the previous and next buttons that send a message to the Main Panel when they are clicked.
|
Adriana Caligari
Registered User
Join date: 21 Apr 2005
Posts: 458
|
Example
09-07-2005 03:53
If you select the NEXT/BACK buttons first then the main prim last this sort of code will work.
>>>>>> NEXT / PREVIOUS CODE
touch_start( integer num ) { llMessageLinked( LINK_PRIM, 0, "NEXT", NULL_KEY ); }
>>>>> Main Prim code
linked_message( integer set, integer parm, string message, key id ) { if ( message == "NEXT" ) { // process next } if ( message == "BACK" ) { // process back } }
Here the link message is sent directly to the root prim - no one else in the link gets the message
Whereas if you dont know which order you have selected and are not sure who is "root" or not This should do:
>>>>>>>>>>NEXT / PREVIOUS CODE
touch_start( integer num ) { llMessageLinked( LINK_SET , llGetLinkNumber() ,"NEXT", NULL_KEY ); }
>>>>>>>>ALL PRIMS IN THE LINK linked_message ( integer set, integer lnum, string message , key id ); { if ( "i have anything to process for next or back" ) { if ( message == "NEXT" ) { //process next .. .. ..etc .. In this case the linked message is sent to all objects in the link - so you have to filter it manually. I included the llGetLinkNumber in the link message purely for example altho' i frequently use it when filtering out things from lots of link messages.
Hope that helps
|
ThugLatino Bling
Registered User
Join date: 6 Jun 2005
Posts: 5
|
Thank You
09-07-2005 20:00
thank you so much for the help Adriana and Gaz
|