Changes

Jump to navigation Jump to search
updated the control script with minor fix to work around y-engine event bug
==Control Script==
<syntaxhighlight lang="lsl" line>
/*
Covey Rez Pro System - Control Script
=====================================
integer dialogMenu = TRUE; //use to control if dialogmenus are active
integer timerCount; //used to turn off the relative mode timer
 
integer debug = FALSE;
//dynamic menu for individual rezzing of items
}//close process yes confirmation
ProcessApiMessage(string messagemessage1){ ProcessApiMessage(message1, "");} ProcessApiMessage(string message1, string message2)
{ //process the api message and acts on the instruction
// string arrives in the format Level0Command,Level1Command
if(debug) llOwnerSay("Debug:Control:ProcessApiMessage: Entered"); list instructions = llCSV2List(messagemessage1);
string instruction = llList2String(instructions,0);
string data = llList2String(instructions,1);
if (debug) llOwnerSay("Debug:Control:ProcessApiMessage:" + "\n" + "Instruction: " + instruction + "\n" + "Data: " + data);
recallMenu = FALSE;
if (instruction == "RezItemsRezItemsApi") RezItems(); else if (instruction == "DeRezItemsDeRezItemsApi") DeRezItems(); else if (instruction == "FinaliseItemsFinaliseItemsApi") FinaliseItems(); else if (instruction == "PositioningModePositioningModeApi") PositioningMode(data); else if (instruction == "RecordingRecordingApi")
{
if (data == "On") ChkBoxPosForRecording();
else if (data == "Off") Recording(data);
}
else if (instruction == "BoxRePosBoxRePosApi") AllowBoxReposition(); else if (instruction == "SetBoxPosSetBoxPosApi") RecordCurrentPosRot(); else if (instruction == "ReRecordAllItemsReRecordAllItemsApi") ReRecordAllItems(); else if (instruction == "RezSingleItemRezSingleItemApi")
{
if (debug) llOwnerSay("Debug:Control:ProcessApiMessage:RezSingleItem:RezDeRezIndividualItemsCalled");
rezDerezMode = "RezItems";
RezDeRezIndividualItem(data);
}
else if (instruction == "DeRezIndividualItemDeRezIndividualItemApi")
{
rezDerezMode = "RemItems";
RezDeRezIndividualItem(data);
}
else if (instruction == "RezRezSetRezRezSetApi")
{
rezDerezMode = "RezItems";
RezDeRezSet(data);
}
else if (instruction == "DeRezRezSetDeRezRezSetApi")
{
rezDerezMode = "RemItems";
RezDeRezSet(data);
}
else if (instruction == "HoverTextInfoHoverTextInfoApi") HoverTextInfo(data); else if (instruction == "ChatFeedbackChatFeedbackApi") ChatFeedBack(data); else if (instruction == "ApiRegionSayRegionSayApi") ApiRegionSay(data); else if (instruction == "ApiLinkedMessageLinkedMessageApi") ApiLinkedMessage(data); else if (instruction == "RezBoxRotRezBoxRotApi") RezBoxRot(data); else if (instruction == "RezBoxPosRezBoxPosApi") RezBoxPos(data); else if (instruction == "DisplayBoxNumberDisplayBoxNumberApi") DisplayBoxNumber(); else if (instruction == "RexBoxPhantomRexBoxPhantomApi") RexBoxPhantom(data); else if (instruction == "RezBoxAlphaRezBoxAlphaApi") RezBoxAlpha(data); else if (instruction == "AllowBoxRepositionAllowBoxRepositionApi") AllowBoxReposition(); else if (instruction == "ItemPickupItemPickupApi") ItemPickup(data); else if (instruction == "UnderGroundMovementUnderGroundMovementApi") UnderGroundMovement (data); else if (instruction == "PrepItemBoxExchangePrepItemBoxExchangeApi") PrepItemBoxExchange(); else if (instruction == "MakeRezSetMakeRezSetApi") MakeRezSet(data); else if (instruction == "ReRecordAllItemsReRecordAllItemsApi") ReRecordAllItems(); else if (instruction == "PrepReRecordPrepReRecordApi") PrepReRecord(); else if (instruction == "UnderGroundMovementUnderGroundMovementApi") UnderGroundMovement(data); else if (instruction == "ItemPickupItemPickupApi") ItemPickup(data); else if (instruction == "MakeRezSetMakeRezSetApi") MakeRezSet(data); else if (instruction == "DialogMenuStatusDialogMenuStatusApi" ) DialogMenuStatus(data); else if (instruction == "ForceUpdateItemPositonsForceUpdateItemPositonsApi") ForceUpdateItemPositons();
}//close process api message
link_message(integer sender_num, integer num, string msg, key msg2)
{ // listens for messages from other scripts in this object
if (num == rezBoxSetNo && debug) llOwnerSay("Debug:Control:link_message: " + msg); if (apiLinkedMessage)
{ //only process if the number matches the one above
if(debug) llOwnerSay("Debug:Control:link_message:ProcessApiMessage called"); ProcessApiMessage(msg, msg2);
}//close if number matches
}//close linked messages
Full instructions in the accompanying notecard
*//*
 
 
</syntaxhighlight>

Navigation menu