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.

Help with a Jump party script

Page: 1 of 1
 DarthStoney
01-28-2009, 11:32 PM
#1
I need a little help with a script,what I am trying to do is during a cutscene is to "hide" the PC and party members by moving them out of site. The script to remove them works fine. The issue is trying to put them back the original position doesn't work.
Here is the 1st move script which works fine
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);

SetLocked(GetObjectByTag("DroidPlanetDoor01"),FALSE);
CreateObject(OBJECT_TYPE_CREATURE,"stunt_sith804",Location(Vector(189.91469,144.69569,33.13980),0.0 f));
CreateObject(OBJECT_TYPE_PLACEABLE,"stunt_sec_attack",Location(Vector(178.14030,136.05354,33.13981),0.0 f));

CreateObject(OBJECT_TYPE_PLACEABLE,"scene1",Location(Vector(177.33075,137.53647,33.13981),0.0 f));
CreateObject(OBJECT_TYPE_PLACEABLE,"scene2",Location(Vector(180.27837,133.48473,33.13981),0.0 f));
CreateObject(OBJECT_TYPE_PLACEABLE,"scene3",Location(Vector(184.71681,136.87610,33.13981),0.0 f));
CreateObject(OBJECT_TYPE_PLACEABLE,"scene4",Location(Vector(193.99925,133.94115,33.13980),0.0 f));

SetGlobalFadeOut (0.0, 1.0);

object oDroid = CreateObject(OBJECT_TYPE_CREATURE, "stunt_sec_cs03", ST_GetLoc("WP_droid"));

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

DelayCommand(1.0, ST_JumpToPoint("WP_spybc1", oParty2));
DelayCommand(1.0, ST_JumpToPoint("WP_spybc2", oParty3));
DelayCommand(1.1, ST_JumpToPoint("WP_spybc", oParty1));

AssignCommand(oDroid, ClearAllActions());
DelayCommand(1.3,AssignCommand(oDroid,ActionStartC onversation(oPC,"sec_record1",CONVERSATION_TYPE_CINEMATIC)));
}

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


void ST_JumpToPoint(string sWP, object oJumper=OBJECT_SELF) {
AssignCommand(oJumper, JumpToLocation( ST_GetLoc(sWP) ));
}
I was trying a variation of this to move them back but its not working
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);

DelayCommand(1.0, ST_JumpToPoint("WP_home1", oParty2));
DelayCommand(1.0, ST_JumpToPoint("WP_home2", oParty3));
DelayCommand(1.1, 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) ));
}

Solved problem: just needed to remove Delaycommand and everything works now.
Page: 1 of 1