Tag Transions

Ideas and suggestions for game mechanics and rules.
Locked
User avatar
indio
Ancient Red Dragon
Posts: 2810
Joined: Sat Jan 03, 2004 10:40 am

Tag Transions

Post 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));
}
}
User avatar
indio
Ancient Red Dragon
Posts: 2810
Joined: Sat Jan 03, 2004 10:40 am

Post by indio »

Sorry AL...my other computer crashed, hence my IRC departure.
User avatar
indio
Ancient Red Dragon
Posts: 2810
Joined: Sat Jan 03, 2004 10:40 am

Post by indio »

Got this sorted out and will implement the new version and give it a shot.
User avatar
AcadiusLost
Chosen of Forumamus, God of Forums
Posts: 5061
Joined: Tue Oct 19, 2004 8:38 am
Location: Montara, CA [GMT -8]
Contact:

Post 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.
Locked