PDA

View Full Version : jump script problem - tsl


newbiemodder
05-07-2010, 03:59 PM
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, 04:48 PM
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, 07:03 PM
Thanks VP, I'll give it a try..

logan23
05-07-2010, 07:11 PM
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
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, 09:14 AM
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.....