LadyHonor Posted September 5, 2017 Share Posted September 5, 2017 In one of my custom quests, the pc has to take a message to three guards. When the last message has been delivered, a team is set active. After everyone is dead, it doesn't exit combat mode. They all just stand there with their bright yellow circles on the ground and their weapons ready while the fighting music continues to play. I don't understand what's wrong here. It's a relatively simple, straight forward quest. I have many far more complicated with no bugs. But the pc and followers simply refuse to exit combat mode in this one. I doubt it's a script issue, but just in case, here are the relevant scripts: Plot Script: #include "log_h" #include "utility_h" #include "wrappers_h" #include "plot_h" #include "plt_lhc_hvr_nightstalking" int StartingConditional() { event eParms = GetCurrentEvent(); // Contains all input parameters int nType = GetEventType(eParms); // GET or SET call string strPlot = GetEventString(eParms, 0); // Plot GUID int nFlag = GetEventInteger(eParms, 1); // The bit flag # being affected object oParty = GetEventCreator(eParms); // The owner of the plot table for this script object oConversationOwner = GetEventObject(eParms, 0); // Owner on the conversation, if any int nResult = FALSE; // used to return value for DEFINED GET events object oPC = GetHero(); plot_GlobalPlotHandler(eParms); // any global plot operations, including debug info if(nType == EVENT_TYPE_SET_PLOT) // actions -> normal flags only { int nValue = GetEventInteger(eParms, 2); // On SET call, the value about to be written (on a normal SET that should be '1', and on a 'clear' it should be '0') int nOldValue = GetEventInteger(eParms, 3); // On SET call, the current flag value (can be either 1 or 0 regardless if it's a set or clear event) // IMPORTANT: The flag value on a SET event is set only AFTER this script finishes running! switch(nFlag) { case LHC_HVR_NS_ACCEPTED: { WR_SetPlotFlag(PLT_LHC_HVR_NIGHTSTALKING, LHC_HVR_NS_AVAILABLE, FALSE, FALSE); break; } case LHC_HVR_NS_GUARD_NOTIFIED_1: { if(WR_GetPlotFlag(PLT_LHC_HVR_NIGHTSTALKING, LHC_HVR_NS_GUARD_NOTIFIED_2) && WR_GetPlotFlag(PLT_LHC_HVR_NIGHTSTALKING, LHC_HVR_NS_GUARD_NOTIFIED_3)) { WR_SetPlotFlag(PLT_LHC_HVR_NIGHTSTALKING, LHC_HVR_NS_ALL_GUARDS_WARNED, TRUE, TRUE); } break; } case LHC_HVR_NS_GUARD_NOTIFIED_2: { if(WR_GetPlotFlag(PLT_LHC_HVR_NIGHTSTALKING, LHC_HVR_NS_GUARD_NOTIFIED_1) && WR_GetPlotFlag(PLT_LHC_HVR_NIGHTSTALKING, LHC_HVR_NS_GUARD_NOTIFIED_3)) { WR_SetPlotFlag(PLT_LHC_HVR_NIGHTSTALKING, LHC_HVR_NS_ALL_GUARDS_WARNED, TRUE, TRUE); } break; } case LHC_HVR_NS_GUARD_NOTIFIED_3: { if(WR_GetPlotFlag(PLT_LHC_HVR_NIGHTSTALKING, LHC_HVR_NS_GUARD_NOTIFIED_1) && WR_GetPlotFlag(PLT_LHC_HVR_NIGHTSTALKING, LHC_HVR_NS_GUARD_NOTIFIED_2)) { WR_SetPlotFlag(PLT_LHC_HVR_NIGHTSTALKING, LHC_HVR_NS_ALL_GUARDS_WARNED, TRUE, TRUE); } break; } case LHC_HVR_NS_ALL_GUARDS_WARNED: { UT_TeamAppears(101); break; } } } else // EVENT_TYPE_GET_PLOT -> defined conditions only { switch(nFlag) { } } plot_OutputDefinedFlag(eParms, nResult); return nResult; } Area Script: #include "log_h" #include "utility_h" #include "wrappers_h" #include "events_h" #include "2da_constants_h" #include "plt_lhc_hvr_nightstalking" void main() { event ev = GetCurrentEvent(); int nEventType = GetEventType(ev); string sDebug; object oPC = GetHero(); object oParty = GetParty(oPC); int nEventHandled = FALSE; switch(nEventType) { /////////////////////////////////////////////////////////////////////// // Sent by: The engine // When: it is for playing things like cutscenes and movies when // you enter an area, things that do not involve AI or actual game play //////////////////////////////////////////////////////////////////////// case EVENT_TYPE_AREALOAD_SPECIAL: { break; } /////////////////////////////////////////////////////////////////////// // Sent by: The engine // When: for things you want to happen while the load screen is still up, // things like moving creatures around //////////////////////////////////////////////////////////////////////// case EVENT_TYPE_AREALOAD_PRELOADEXIT: { int nAreaOnce = GetLocalInt(OBJECT_SELF,AREA_DO_ONCE_A); if(nAreaOnce == FALSE) { SetLocalInt(OBJECT_SELF,AREA_DO_ONCE_A,TRUE); DoAutoSave(); } if(WR_GetPlotFlag(PLT_LHC_HVR_NIGHTSTALKING, LHC_HVR_NS_TEAM_DESTROYED_1)) { UT_TeamAppears(102); } if(WR_GetPlotFlag(PLT_LHC_HVR_NIGHTSTALKING, LHC_HVR_NS_TEAM_DESTROYED_2)) { UT_TeamAppears(103); } break; } //////////////////////////////////////////////////////////////////////// // Sent by: The engine // When: fires at the same time that the load screen is going away, // and can be used for things that you want to make sure the player sees. //////////////////////////////////////////////////////////////////////// case EVENT_TYPE_AREALOAD_POSTLOADEXIT: { break; } //////////////////////////////////////////////////////////////////////// // Sent by: The engine // When: A creature enters the area //////////////////////////////////////////////////////////////////////// case EVENT_TYPE_ENTER: { object oCreature = GetEventCreator(ev); break; } //////////////////////////////////////////////////////////////////////// // Sent by: The engine // When: A creature exits the area //////////////////////////////////////////////////////////////////////// case EVENT_TYPE_EXIT: { object oCreature = GetEventCreator(ev); break; } case EVENT_TYPE_TEAM_DESTROYED: { if(GetEventInteger(ev,0) == 101) { WR_SetPlotFlag(PLT_LHC_HVR_NIGHTSTALKING, LHC_HVR_NS_TEAM_DESTROYED_1, TRUE, TRUE); } if(GetEventInteger(ev,0) == 102) { WR_SetPlotFlag(PLT_LHC_HVR_NIGHTSTALKING, LHC_HVR_NS_TEAM_DESTROYED_2, TRUE, TRUE); } if(GetEventInteger(ev,0) == 103) { UT_TeamAppears(104); WR_SetPlotFlag(PLT_LHC_HVR_NIGHTSTALKING, LHC_HVR_NS_TEAM_DESTROYED_3, TRUE, TRUE); } if(GetEventInteger(ev,0) == 104) { WR_SetPlotFlag(PLT_LHC_HVR_NIGHTSTALKING, LHC_HVR_NS_TEAM_DESTROYED_4, TRUE, TRUE); } if(GetEventInteger(ev,0) == 105) { WR_SetPlotFlag(PLT_LHC_HVR_NIGHTSTALKING, LHC_HVR_NS_TEAM_DESTROYED_5, TRUE, TRUE); } break; } } if (!nEventHandled) { HandleEvent(ev, RESOURCE_SCRIPT_AREA_CORE); } } Any helpful advice would be appreciated. LH Link to comment Share on other sites More sharing options...
LadyHonor Posted September 7, 2017 Author Share Posted September 7, 2017 I don't know what fixed it but it's no longer getting stuck in combat mode. I didn't touch the scripts. I just deleted all the files in the addins folder and did a fresh export. Link to comment Share on other sites More sharing options...
LadyHonor Posted September 21, 2017 Author Share Posted September 21, 2017 Ok....it's not fixed...does anyone know how to fix this? Link to comment Share on other sites More sharing options...
Recommended Posts