Jump to content

Home

jump script problem - tsl


Recommended Posts

I have this script:

 

void main() { 
object oJump1 = GetFirstPC(); 
object oJump2 = GetObjectByTag("n_darthloqi", 0);



AssignCommand(oJump1, ClearAllActions());
AssignCommand(oJump1, ClearAllEffects());

AssignCommand(oJump2, ClearAllActions());
AssignCommand(oJump2, ClearAllEffects());


object oJumpto1 = GetWaypointByTag("wp_1st_pc");
object oJumpto2 = GetWaypointByTag("wp_loqi");

location lJump1 = GetLocation(oJumpto1); 
location lJump2 = GetLocation(oJumpto2); 

AssignCommand(oJump1, ActionJumpToLocation(lJump1)); 
AssignCommand(oJump2, ActionJumpToLocation(lJump2)); 

}

 

 

I have this attached to dialog/cutscene and if the you skip through the cutscene before the animation is finished, the pc and the npc will jump to the desired destination. This script works fine, except the party members do not jump with the pc.

 

How do I tweak this script to get the party members to jump to the desired location as well. Thanks for any help.

Link to comment
Share on other sites

void main() { 
object oJump1 = GetFirstPC(); 
[color="DarkOrange"]object oJumpParty1 = GetNextPC();
object oJumpParty2 = GetNextPC();[/color]
object oJump2 = GetObjectByTag("n_darthloqi", 0);



AssignCommand(oJump1, ClearAllActions());
AssignCommand(oJump1, ClearAllEffects());

AssignCommand(oJump2, ClearAllActions());
AssignCommand(oJump2, ClearAllEffects());

AssignCommand(oParty1, ClearAllActions());
AssignCommand(oParty1, ClearAllEffects());

AssignCommand(oParty2, ClearAllActions());
AssignCommand(oParty2, ClearAllEffects());

object oJumpto1 = GetWaypointByTag("wp_1st_pc");
[color="DarkOrange"](you'll have to make waypoints for the party members)[/color]
object oJumpto2 = GetWaypointByTag("wp_loqi");

location lJump1 = GetLocation(oJumpto1); 
location lJump2 = GetLocation(oJumpto2); 

AssignCommand(oJump1, ActionJumpToLocation(lJump1)); 
AssignCommand(oJump2, ActionJumpToLocation(lJump2)); 

}

 

 

Well, you get the idea.

Link to comment
Share on other sites

If by chance you run into trouble,I used one like that once and it was very inconsistent,sometimes your party would just stay where they were. This one works a little better.

location ST_GetLoc(string sWP);
void ST_JumpToPoint(string sWP, object oJumper=OBJECT_SELF);


void main() {
       object oPC = GetFirstPC();
       object oParty1 = GetPartyMemberByIndex(0);
       object oParty2 = GetPartyMemberByIndex(1);
       object oParty3 = GetPartyMemberByIndex(2);

       CancelCombat(oParty1);
       CancelCombat(oParty2);
       CancelCombat(oParty3);

       ST_JumpToPoint("WP_home1", oParty2);
       ST_JumpToPoint("WP_home2", oParty3);
       ST_JumpToPoint("WP_home",  oParty1);
   }

location ST_GetLoc(string sWP) {
   return GetLocation(GetObjectByTag(sWP));
}


void ST_JumpToPoint(string sWP, object oJumper=OBJECT_SELF) {
   AssignCommand(oJumper, JumpToLocation( ST_GetLoc(sWP) ));
}

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...