- Joined
- Sep 20, 2018
- Messages
- 4,051
This is to help figure out and test rotation code.
Simple script to drop into a cube, changing each face to red, green, blue to correspond with x, y, & z axis. Each face also has a plus or minus sign to indicate +/- for each axis.
EDIT: Added self-deleting code to remove the script after it sets up the prim attributes
Simple script to drop into a cube, changing each face to red, green, blue to correspond with x, y, & z axis. Each face also has a plus or minus sign to indicate +/- for each axis.
EDIT: Added self-deleting code to remove the script after it sets up the prim attributes
Code:
key kPlus = "191ac4d1-53ca-bbeb-df6a-9b73b0c3b252";
key kMinus = "ff3be368-268f-ab53-087f-43bb8d9b0fff";
delete_me()
{
llOwnerSay("Setup complete. Deleting configuration script...");
llRemoveInventory(llGetScriptName());
}
default
{
state_entry()
{
llSetPrimitiveParams(
[PRIM_TEXTURE, ALL_SIDES, TEXTURE_BLANK, <1,1,0>, ZERO_VECTOR, 0.0]
);
llSetPrimitiveParams([PRIM_FULLBRIGHT, ALL_SIDES, TRUE]);
llSetPrimitiveParams([PRIM_COLOR, 0, <0.5,0.5,1.0>, 1.0]);
llSetPrimitiveParams([PRIM_COLOR, 1, <0.5,1.0,0.5>, 1.0]);
llSetPrimitiveParams([PRIM_COLOR, 2, <1.0,0.5,0.5>, 1.0]);
llSetPrimitiveParams([PRIM_COLOR, 3, <0.5,1.0,0.5>, 1.0]);
llSetPrimitiveParams([PRIM_COLOR, 4, <1.0,0.5,0.5>, 1.0]);
llSetPrimitiveParams([PRIM_COLOR, 5, <0.5,0.5,1.0>, 1.0]);
llSetPrimitiveParams([PRIM_TEXTURE, 0, kPlus, <1,1,0>, ZERO_VECTOR, 0.0]);
llSetPrimitiveParams([PRIM_TEXTURE, 1, kMinus, <1,1,0>, ZERO_VECTOR, 0.0]);
llSetPrimitiveParams([PRIM_TEXTURE, 2, kPlus, <1,1,0>, ZERO_VECTOR, 0.0]);
llSetPrimitiveParams([PRIM_TEXTURE, 3, kPlus, <1,1,0>, ZERO_VECTOR, 0.0]);
llSetPrimitiveParams([PRIM_TEXTURE, 4, kMinus, <1,1,0>, ZERO_VECTOR, 0.0]);
llSetPrimitiveParams([PRIM_TEXTURE, 5, kMinus, <1,1,0>, ZERO_VECTOR, 0.0]);
delete_me();
}
}
Last edited: