Jump to content

Home

Help with a Jump party script


DarthStoney

Recommended Posts

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.0f));
       CreateObject(OBJECT_TYPE_PLACEABLE,"stunt_sec_attack",Location(Vector(178.14030,136.05354,33.13981),0.0f));

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

       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,ActionStartConversation(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.

Link to comment
Share on other sites

Archived

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

×
×
  • Create New...