Author Topic: Area transition in conversation  (Read 667 times)

Legacy_simomate

  • Full Member
  • ***
  • Posts: 162
  • Karma: +0/-0
Area transition in conversation
« on: October 03, 2010, 09:48:01 am »


               "Would you like to go there now?"

PC: "Yes"

When the PC clicks yes, he should appear at the destination

The tag I tried is:

void main()
{
    object oPC = GetPCSpeaker();
    object oWaypoint = GetObjectByTag("pod");
    AssignCommand,(oWaypoint);
}

but nothing happened. What am I missing out?
               
               

               


                     Modifié par simomate, 03 octobre 2010 - 09:20 .
                     
                  


            

Legacy_Fester Pot

  • Hero Member
  • *****
  • Posts: 1698
  • Karma: +0/-0
Area transition in conversation
« Reply #1 on: October 03, 2010, 03:03:06 pm »


               

void main()
{

object oPC = GetPCSpeaker();

object oTarget = GetWaypointByTag("pod");
location lTarget = GetLocation(oTarget);

if (GetAreaFromLocation(lTarget)==OBJECT_INVALID) return;

oTarget=GetFirstFactionMember(oPC, FALSE);

while (GetIsObjectValid(oTarget))
  {
  AssignCommand(oTarget, ClearAllActions());
  AssignCommand(oTarget, ActionJumpToLocation(lTarget));
  oTarget=GetNextFactionMember(oPC, FALSE);
  }

}


FP!
               
               

               


                     Modifié par Fester Pot, 03 octobre 2010 - 02:03 .
                     
                  


            

Legacy_simomate

  • Full Member
  • ***
  • Posts: 162
  • Karma: +0/-0
Area transition in conversation
« Reply #2 on: October 04, 2010, 05:07:25 am »


               Worked like a charm! My deepest gratitude to you '<img'>