Page 1 of 1

Tag Transions

Posted: Mon Mar 10, 2008 2:16 am
by indio
This is for AL to help me get something working.

Code: Select all

void main()
{
object oPC = GetLastOpenedBy();
if (!GetIsPC(oPC)) return;
object oTarget;
location lTarget;
string sEnteringTrigger = GetTag(OBJECT_SELF);
SendMessageToPC(oPC, sEnteringTrigger);
string sMinusExtension = GetSubString(sEnteringTrigger,0,GetStringLength(sEnteringTrigger)-4);
SendMessageToPC(oPC, sMinusExtension);
int nLen = GetStringLength(sMinusExtension);
string sModifyingCharacter = "exit";
SendMessageToPC(oPC, sModifyingCharacter);
if (GetLocalInt(OBJECT_SELF, "Exit")>= 1)
   {
string sModifyingCharacter = "entr";
string sTeleportTo = InsertString( sMinusExtension, sModifyingCharacter, nLen);
oTarget = GetObjectByTag(sTeleportTo);
lTarget = GetLocation(oTarget);
AssignCommand(oPC, ClearAllActions());
AssignCommand(oPC, ActionJumpToLocation(lTarget));
   }
   else
   {
string sTeleportTo = InsertString( sMinusExtension, sModifyingCharacter, nLen);
oTarget = GetObjectByTag(sTeleportTo);
lTarget = GetLocation(oTarget);
AssignCommand(oPC, ClearAllActions());
AssignCommand(oPC, ActionJumpToLocation(lTarget));
}
}

Posted: Mon Mar 10, 2008 3:03 am
by indio
Sorry AL...my other computer crashed, hence my IRC departure.

Posted: Wed Mar 12, 2008 4:24 am
by indio
Got this sorted out and will implement the new version and give it a shot.

Posted: Wed Mar 12, 2008 5:09 am
by AcadiusLost
My favorite kind of problem! The kind that sorts itself out just fine while I'm looking the other way.

Let me know if you have any other complications arise.