Pavlos Posted April 22, 2006 Share Posted April 22, 2006 // ebo_intro //#include "k_inc_ebo" void main() { object oNPC1 = GetObjectByTag("n_sithcmndo_001"); object oNPC2 = GetObjectByTag("n_sithcmndo_002"); object oNPC3 = GetObjectByTag("n_sithleader"); location loc1 = GetLocation(GetObjectByTag("wp_sith001")); location loc2 = GetLocation(GetObjectByTag("wp_sith002")); location loc3 = GetLocation(GetObjectByTag("wp_sith003")); int nParam1 = GetScriptParameter(1); switch (nParam1) { case 1: {ActionPauseConversation(); SetDialogPlaceableCamera(3); AssignCommand(oNPC1, ClearAllActions()); AssignCommand(oNPC2, ClearAllActions()); AssignCommand(oNPC3, ClearAllActions()); DelayCommand(0.1, AssignCommand(oNPC1, ActionMoveToLocation(loc1, TRUE))); DelayCommand(0.2, AssignCommand(oNPC2, ActionMoveToLocation(loc2, TRUE))); DelayCommand(0.3, AssignCommand(oNPC3, ActionMoveToLocation(loc3, TRUE))); //DelayCommand(0.5, PlayExplosion(TRUE, TRUE)); DelayCommand(0.6, ActionOpenDoor(GetObjectByTag("door_bridge1"))); DelayCommand(5.0, ActionResumeConversation());} break; case 2: {SetGlobalBoolean("GBL_EDWYRD_J", 1); AddAvailableNPCByTemplate(1, "p_edwyrd"); ShowPartySelectionGUI();} break; } } I just do not understand why my cutscene will not work. It is launched via a dialogue and everything works perfectly aside from the fact that for "Case 1" the camera goes to where I want it but no NPCs race out infront of it - they don't move at all! At first I thought it could be my include script (Which contained a function to cause an explosion effect on my door - I know it seems pointless to have a custom function for just that but it keeps my main scripts cleaner and tidier.) So I removed the command to call it... but it still won't work! Nothing happens... the three Sith just stand there! Can somebody please help me as I know not why this doesn't work... Link to comment Share on other sites More sharing options...
stoffe Posted April 22, 2006 Share Posted April 22, 2006 object oNPC1 = GetObjectByTag("n_sithcmndo_001"); object oNPC2 = GetObjectByTag("n_sithcmndo_002"); object oNPC3 = GetObjectByTag("n_sithleader"); for "Case 1" the camera goes to where I want it but no NPCs race out infront of it - they don't move at all! Are you sure that you have set the tags for the NPCs correctly? Those above look more like the ResRef than the Tag, if going by the standard naming conventions used by Obsidian. (Resref is what you use to spawn an NPC, Tag is what you use to access an existing one.) Link to comment Share on other sites More sharing options...
Pavlos Posted April 22, 2006 Author Share Posted April 22, 2006 I always keep the tag and the resref the same - it serves to ease the pain on my memory . Link to comment Share on other sites More sharing options...
Darkkender Posted April 23, 2006 Share Posted April 23, 2006 Have you tried adjusting the delay timing to whole integars? The reason is sometimes the delays work fine and dandy with Float's and other times it seems nothing happens at all. This is only a guess based on the last time I messed with multiple delay actions. Link to comment Share on other sites More sharing options...
Pavlos Posted April 23, 2006 Author Share Posted April 23, 2006 I'll try that... it is just that the last time I told three people to walk down the corridor at once nothing happened. So I presumed I mst have overloaded the engine and thus I placed a tiny time delay infront of each one and it worked again. But I'll try it as you say . Edit: Nope! Didn't work... does exactly the same thing. I never have much luck scripting cut scenes... I don't understand why though! Link to comment Share on other sites More sharing options...
stoffe Posted April 23, 2006 Share Posted April 23, 2006 I always keep the tag and the resref the same - it serves to ease the pain on my memory . Some more ideas... Is the "door_bridge1" door between the NPCs and their destination locations? If so it's possible they reach the door before it opens, which would cancel their Move action to allow them to attempt to open the door. There may be a slight delay between an Open action being assigned and the door actually opening. NWScript is horrible when it comes to syncing actions carefully, there are so many factors that affect how quickly Actions are being performed. Also, depending on who is running the script the door may not be opened at all. It's probably safest to let the door open itself. The ActionPauseConversation/ActionResumeConversation probably isn't necessary if it's just running delayed either, since you can set that delay on the dialog entry where the script is fired to determine how logn it stays on that entry before moving on. That's not a bug though. Try this variation of your script and see if there is any difference in the behavior, and check the Feedback screen to see if there are any errors printed: void MoveToWP(string sMoveTag, string sDestTag ) { object oNPC = GetObjectByTag(sMoveTag); object oWP = GetObjectByTag(sDestTag); if (!GetIsObjectValid(oNPC)) SendMessageToPC(GetPartyLeader(), "ERROR: NPC " + sMoveTag + " could not be found!"); if (!GetIsObjectValid(oWP)) SendMessageToPC(GetPartyLeader(), "ERROR: Waypoint " + sDestTag + " could not be found!"); AssignCommand(oNPC, ClearAllActions()); AssignCommand(oNPC, ActionMoveToObject(oWP, TRUE, 0.1)); } void main() { switch (GetScriptParameter(1)) { case 1: ActionPauseConversation(); SetDialogPlaceableCamera(3); object oDoor = GetObjectByTag("door_bridge1"); AssignCommand(oDoor, ActionOpenDoor(oDoor)); DelayCommand(0.1, MoveToWP("n_sithcmndo_001", "wp_sith001")); DelayCommand(0.2, MoveToWP("n_sithcmndo_002", "wp_sith002")); DelayCommand(0.3, MoveToWP("n_sithleader", "wp_sith003")); DelayCommand(5.0, ActionResumeConversation()); break; case 2: SetGlobalBoolean("GBL_EDWYRD_J", TRUE); AddAvailableNPCByTemplate(NPC_BAO_DUR, "p_edwyrd"); DelayCommand(0.5, ShowPartySelectionGUI()); break; } } Link to comment Share on other sites More sharing options...
Pavlos Posted April 23, 2006 Author Share Posted April 23, 2006 Thanks, stoffe, I will try that later when I get a chance. Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.