Welcome to the Second Life Forums Archive

These forums are CLOSED. Please visit the new forums HERE

Something weird when selecting the lid of the box

Seagel Neville
Far East User
Join date: 2 Jan 2005
Posts: 1,476
07-11-2005 01:17
Hello there,

If you right-click on the box and select "hide" on the pie menu, the top-lid opens, you get in it, and the lid closes. I'm making this kind of thing.
The box is constructed out of three prims, a top-lid, a bottom, and a four-sides. They are all linked. The bottom is the root prim and has the main script in its contnets folder. The top-lid is built by a cutting prim and open-close movement is like a door. That open-close script is described link_mssage event and receives commands from the main script in the root prim. The main script is described mainly run_time_permission event and a sequence of functions like below.

1. Sending open command to the lid by llMessageLinked.
2. The hiding animation fires
3. Sending close command to the lid by llMessageLinked.

These are very simple.
But I found something weird. When I right-clicked on the top-lid and selected "hide", the top-lid didn't open and I had just sit on it. When I, however, right-clicked on the four-sides, it worked fine. Can that happen? What should I do because everbody would click on the top-lid?

Thanks.
_____________________
:) Seagel Neville :)
Kurt Zidane
Just Human
Join date: 1 Apr 2004
Posts: 636
07-11-2005 06:07
are you sure the box is the root prime?
Seagel Neville
Far East User
Join date: 2 Jan 2005
Posts: 1,476
07-11-2005 13:03
Hi Kurt, thank you for replying.

hmmm... the root prim is the bottom board rather than the box.
I named the bottom board what I wanted to call and the box became the exact that name after linking all. So I made sure that the root prim was the bottom, not the top-lid and the four-sides.
I take the box for the state linked all three prims, the bottom, the four-sides, and the top-lid. So I don't understand well what you asked.
Or you mean, should I make the root prim be the top-lid or the four-sides?
_____________________
:) Seagel Neville :)
Kurt Zidane
Just Human
Join date: 1 Apr 2004
Posts: 636
07-12-2005 00:28
The script that responds to touch, should be in the root prim's inventory. When you click on the link set, and chose edit, and go to inventory.
Jillian Callahan
Rotary-winged Neko Girl
Join date: 24 Jun 2004
Posts: 3,766
07-12-2005 00:56
Seagel, the lid may have an errant sit target. Remove any sit target thus:

CODE
default
{
state_entry()
{
llSitTarget(ZERO_VECTOR, ZERO_ROTATION);
llSleep(0.1);
llSay(0, "SIT REMOVED");
llRemoveInventory(llGetScriptName());
}
}


Also: On occasion, something goes "wonky" with linked prims. You can also try to shift-drag a copy into existance and see if that one behaves better.
_____________________
Seagel Neville
Far East User
Join date: 2 Jan 2005
Posts: 1,476
07-12-2005 20:13
Jillian, thanks for the information.

Though I've not tried it, yet, I'll try the both you told after coming home.
I've built some touch and open gift box and understood about the relations of prims. But it is my first trial to send link message by the sitting triggar.

Thanks.
_____________________
:) Seagel Neville :)
Seagel Neville
Far East User
Join date: 2 Jan 2005
Posts: 1,476
07-13-2005 06:10
From: Jillian Callahan
Also: On occasion, something goes "wonky" with linked prims. You can also try to shift-drag a copy into existance and see if that one behaves better.
Jillian, :eek: This is the exact solution!
Amazing! Just copying the whole linked object, it worked fine!!!
Gee. I learnd the new thing again. Thank you very much. I admire your experience.
_____________________
:) Seagel Neville :)