Welcome to the Second Life Forums Archive

These forums are CLOSED. Please visit the new forums HERE

Child Object Not Moving

Kurshie Muromachi
Primtastic!
Join date: 24 Apr 2005
Posts: 278
10-12-2005 23:18
CODE
llSetPos(llGetLocalPos() + <5,0,0>);


This works in a touch_start() event but I for some reason cannot get this work in a link_message() event. The link_message() event is being triggered because I confirmed this with an llOwnerSay(). Any ideas why I can't get the child object to move?

Here's my exact code straight from the child prim.

CODE

default
{
link_message(integer sender_num, integer num, string str, key id)
{
llOwnerSay("Message Link Heard");

list mlist = llParseString2List(str, [" "], []);

llSetPos(llGetLocalPos() + <5,0,0>);
}
}
_____________________
Ben Bacon
Registered User
Join date: 14 Jul 2005
Posts: 809
10-13-2005 05:23
Is it in an attachment? If so you're gonna hafta wait for 1.7 (next week hopefully :rolleyes: )
Kurshie Muromachi
Primtastic!
Join date: 24 Apr 2005
Posts: 278
10-13-2005 21:00
It's not an attachment.
SuezanneC Baskerville
Forums Rock!
Join date: 22 Dec 2003
Posts: 14,229
10-13-2005 21:41
I pasted your code into a default box, made another default box, did a messagelinked to linknumber 2 in the touch event - the child prim with your code in it did move.

This worked in regular grid and preview grid.
_____________________
-

So long to these forums, the vBulletin forums that used to be at forums.secondlife.com. I will miss them.

I can be found on the web by searching for "SuezanneC Baskerville", or go to

http://www.google.com/profiles/suezanne

-

http://lindenlab.tribe.net/ created on 11/19/03.

Members: Ben, Catherine, Colin, Cory, Dan, Doug, Jim, Philip, Phoenix, Richard,
Robin, and Ryan

-
Kurt Zidane
Just Human
Join date: 1 Apr 2004
Posts: 636
10-14-2005 10:38
How many prims are you trying to move in the object?
Kurshie Muromachi
Primtastic!
Join date: 24 Apr 2005
Posts: 278
10-14-2005 13:02
From: Kurt Zidane
How many prims are you trying to move in the object?


Trying to move the child prim out of the 2 that were linked. So a Parent and Child, 2 prim linkage.
_____________________
Kurshie Muromachi
Primtastic!
Join date: 24 Apr 2005
Posts: 278
10-14-2005 13:20
Okk, here is the script again but now including the parent script. I toned this script down to basics and still having the issue.

PARENT SCRIPT
CODE
default
{
state_entry()
{
llListen(1, "", llGetOwner(), "");
}

listen(integer channel, string name, key id, string message)
{
llMessageLinked(2, 0, "test", NULL_KEY);
}
}

CHILD SCRIPT
CODE
default
{
link_message(integer sender_num, integer num, string str, key id)
{
llOwnerSay("Message Link Heard");
llSetPos(llGetLocalPos() + <5,0,0>);
}
}


This is a 2 prim linkage. Give it a try please. I was thinking it might be bugged or something so I tried recreating it and still same issue. The child prim acknowledged it heard the link message with the "Message Link Heard" message but llSetPos() did not take effect. :confused:

Just type "/1 test" and see what happens.
Kurshie Muromachi
Primtastic!
Join date: 24 Apr 2005
Posts: 278
10-14-2005 13:53
I had a friend of mine try something out of the ordinary. She sat on it then did a "/1 test" and IT WORKED. She stood up from it and tried again and did NOT work again. What the heck? lol
Strife Onizuka
Moonchild
Join date: 3 Mar 2004
Posts: 5,887
10-14-2005 14:59
From: Kurshie Muromachi
I had a friend of mine try something out of the ordinary. She sat on it then did a "/1 test" and IT WORKED. She stood up from it and tried again and did NOT work again. What the heck? lol


It's the link distance constraints. The max link distance is inversely proportionate to the size of the largest side of all the prims in the set. Course link distance code is buggy so there are ways to cheat (which i won't mention).

When the changed link distance is greater then the max then it silently fails.
_____________________
Truth is a river that is always splitting up into arms that reunite. Islanded between the arms, the inhabitants argue for a lifetime as to which is the main river.
- Cyril Connolly

Without the political will to find common ground, the continual friction of tactic and counter tactic, only creates suspicion and hatred and vengeance, and perpetuates the cycle of violence.
- James Nachtwey
Kurshie Muromachi
Primtastic!
Join date: 24 Apr 2005
Posts: 278
10-14-2005 16:51
From: Strife Onizuka
It's the link distance constraints. The max link distance is inversely proportionate to the size of the largest side of all the prims in the set. Course link distance code is buggy so there are ways to cheat (which i won't mention).

When the changed link distance is greater then the max then it silently fails.


Link distance constraints? Weird. My prim link was not even that far apart. I left little gap between the two. And this even happend with the two prims being default wood cubes. Hrm. Doesn't make too much sense to me but I take this is a known bug from what you are saying?
Seagel Neville
Far East User
Join date: 2 Jan 2005
Posts: 1,476
10-15-2005 06:07
From: Kurshie Muromachi
Link distance constraints? Weird. My prim link was not even that far apart. I left little gap between the two. And this even happend with the two prims being default wood cubes. Hrm. Doesn't make too much sense to me but I take this is a known bug from what you are saying?
I heard link distance constraint was less than 10m. Your script lets it move a child prim 5m once. It is natural it cannot work but once.
_____________________
:) Seagel Neville :)
Kurshie Muromachi
Primtastic!
Join date: 24 Apr 2005
Posts: 278
10-15-2005 18:10
From: Seagel Neville
I heard link distance constraint was less than 10m. Your script lets it move a child prim 5m once. It is natural it cannot work but once.


But it doesn't even move once. The only time it works is if someone sits on the linked object.

Let me also add that when sitting on it I can move it farther than 10m. That is executing the script more than two times.
Seagel Neville
Far East User
Join date: 2 Jan 2005
Posts: 1,476
10-15-2005 23:37
Kurshie, sorry, I told that without making sure.

There might be another constraint refered to the distance.
I tested it by the default cube and found it was at most 4.7m that the child prim could move by llSetPos. It might be different due to the size. So try to find the limit movement of your own prim.
_____________________
:) Seagel Neville :)
Alex Edo
Insert Brain Here...
Join date: 27 Feb 2005
Posts: 108
10-16-2005 02:13
Hi, I am told that if you are moving a child prim you just use llSetPos(<0,0,0>;); As the prim always refers to the "adult" prim.