Welcome to the Second Life Forums Archive

These forums are CLOSED. Please visit the new forums HERE

Help! Moving a linked object

Meknes Marlowe
Registered User
Join date: 25 Apr 2005
Posts: 14
04-25-2005 11:12
Hi all, wondering if anyone can help me with this? I'm trying to create a board for a game, and I need to be able to click on two positions on the board so that a linked object will move from one position to another. I tried making the board out of a set of prims, so that I could get the position of each using llGetLocalPos, but I can't get this information to the object I want to move. How do I go about this, or should I be doing something else?

Thanks,

Meknes
Talila Liu
Micro Builder
Join date: 29 Jan 2004
Posts: 132
04-25-2005 11:39
If they are a linked set, as in the pieces to move are linked to the positions;

In the touch_start event or touch make a call to the item at the current position, IE. your bored is broken down into a grid defined like 11 for the lower corner and 88 for the upper corner on the opposite side.

Each piece should remember this to know where it is.

So have your board use llMessageLinked to send that number to choose the piece, and then the destination send another llMessageLinked for the enddestination.

In your pieces to be moved you'd have to have the link_message event handler

Cheers
~Talila
Meknes Marlowe
Registered User
Join date: 25 Apr 2005
Posts: 14
04-26-2005 03:30
Thanks Talila, I'll try that!
Rayve Mendicant
Scripts for L$5 billion
Join date: 12 Mar 2005
Posts: 90
04-26-2005 16:57
I'm starting a project that uses this type of function tomorrow. I've already made the board and messed with the translations. It shouldnt' take me long to complete it, so if you still have questions IM me in game under cell Neutra.

Rayve Mendicant
cell Neutra
Pushing The Limits