...then the sandbox started deleting. >_<
Can someone help please?
CODE
// Left Plate Open Script
// Code: integer holeshape, vector cut, float hollow, vector twist, vector dimple
// Closed State
stateClose()
{
llSetPrimitiveParams([PRIM_SIZE, <0.436, 0.439, 0.459>, PRIM_ROTATION, <-0.70536, -0.04933, 0.70540, 0.04949>, PRIM_TYPE, PRIM_TYPE_SPHERE, 0, <0.40, 0.50, 0.0>, 0.95, <0.0, 0.0, 0.0>, <0.5, 0.76, 0.0>]);
}
// Expanded State
stateExpand()
{
llSetPrimitiveParams([PRIM_SIZE, <0.466, 0.469, 0.489>, PRIM_ROTATION, <-0.70536, -0.04933, 0.70540, 0.04949>, PRIM_TYPE, PRIM_TYPE_SPHERE, 0, <0.40, 0.495, 0.0>, 0.95, <0.0, 0.0, 0.0>, <0.5, 0.76, 0.0>]);
}
// Open State
stateOpen()
{
llSetPrimitiveParams([PRIM_SIZE, <0.466, 0.469, 0.489>, PRIM_ROTATION, <0.68901, 0.25341, -0.66016, 0.15890>, PRIM_TYPE, PRIM_TYPE_SPHERE, 0, <0.40, 0.495, 0.0>, 0.95, <0.0, 0.0, 0.0>, <0.5, 0.76, 0.0>]);
}
integer gOpen = 0;
default
{
state_entry()
{
// listen on channel zero for any chat spoken by the object owner.
llListen(0,"",llGetOwner(),"");
}
listen(integer channel, string name, key id, string message)
{
if (llToLower(message) == "open") // To Open...
{
if(!gOpen)
{
// Step 1: Expand, hiss, steam
stateExpand();
// Hiss Sound Effect goes here.
// Steam Activation goes here
// Wait 2 seconds...
llSleep(2);
// Step 2: Open, sound effect
stateOpen();
// 'Woosh' sound effect goes here
// Step 3: Idle
gOpen = 1;
}
else
{
llOwnerSay(0, "Already Open.");
}
}
else if(llToLower(message) == "close") // To Close...
{
if(gOpen)
{
// Step 1: Close, sound effect
stateExpand();
// 'Woosh' sound effect here
// Step 2: Shrink, hiss, steam
// Steam, hiss sound (for 1 second)
// Wait 1 second...
llSleep(1);
stateClose();
// 'Closing' sound effect
// Step 3: Idle
gOpen = 0;
}
else
{
llOwnerSay(0, "Already Closed");
{
}
}
}
Additionally, I can't figure out the rotate commands. When I set it on the ground, it works fine. When I wear it, the rotations get all messed up. Can someone explain this to me? I'll probably figure it out after pouring through the wiki some more, but live help is always nice..
