Jump to content

linked objects - Tic Tac Toe


Mister Webwyre
 Share

You are about to reply to a thread that has been inactive for 4355 days.

Please take a moment to consider if this thread is worth bumping.

Recommended Posts

Hi guys and gals,

As a scripting newbie, I was working through this example:

http://wiki.secondlife.com/wiki/Tic_Tac_Toe

I seem to be missing something on how to link the cubes together.

(I click the first one, then shift click the next 8, then click the link button ... is there another (corrrect ?) way to do it ?)

When I link them, the llGetLinkNumber() function returns the same number, on any cube I touch.

I was expecting (for 9 cubes), nine distinct link numbers / id's

Mike

Here's a test script I was trying to use :

 

//
// ShowLinkNum  - use with two or more linked objects
//

integer lnum = 0;

default {
    state_entry() {
     lnum = llGetLinkNumber();
     llOwnerSay("(ShowLinkNum) state_entry) lnum : " + (string) lnum);
     llOwnerSay("llGetNumberOfPrims: " + (string) llGetNumberOfPrims());
    }

 touch_start(integer touching_agents) {
        llOwnerSay("(ShowLinkNum) touch_start) lnum : " + (string) lnum);
    }
}


 

Link to comment
Share on other sites

Thanks ! ' llDetectedLinkNumber seems to be the function to use for the touch_start event.

 

Now, I added a llSetColor(..... to the touch_start event, but when I click on any of the cubes only cube "#1" is changing color.

I want which ever cube was clicked to change color.

Mike

Link to comment
Share on other sites

You are about to reply to a thread that has been inactive for 4355 days.

Please take a moment to consider if this thread is worth bumping.

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
 Share

×
×
  • Create New...