Note: LucasForums Archive Project
The content here was reconstructed by scraping the Wayback Machine in an effort to restore some of what was lost when LF went down. The LucasForums Archive Project claims no ownership over the content or assets that were archived on archive.org.

This project is meant for research purposes only.

jump script problem - tsl

Page: 1 of 1
 newbiemodder
05-07-2010, 3:59 PM
#1
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.
 VarsityPuppet
05-07-2010, 4:48 PM
#2
void main() {
object oJump1 = GetFirstPC();
object oJumpParty1 = GetNextPC();
object oJumpParty2 = GetNextPC();
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");
(you'll have to make waypoints for the party members)
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.
 newbiemodder
05-07-2010, 7:03 PM
#3
Thanks VP, I'll give it a try..
 logan23
05-07-2010, 7:11 PM
#4
This is going to come in useful!!

Thanks newbiemodder for asking the question...
and thanks VarsityPuppet for the Script....:thmbup1:
 DarthStoney
05-07-2010, 11:15 PM
#5
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) ));
}
 newbiemodder
05-08-2010, 9:14 AM
#6
Thanks DS...I'll give your a try ....mine and vp's is inconsistent...sometimes the pc would jump and the party would stay...or sometimes the party would jump and the pc would stay.....
Page: 1 of 1