Hello, everyone. I'll state right off the bat that I know very little about scripting, but I've been making due by following the tutorials on the wiki. Unfortunately, I've run into a bit of an odd problem: the custom companion that I've added to the OC is following me around camp. Upon entering the party camp, she'll be placed in her proper location just fine, but due to the fact that she is still in my active party for some reason, she ends up following me around.
I'm currently using the scripts from Karma's tutorial if that matters, but at this point I'm not even sure which script is causing the issue, so I've no idea where to start.
Any help is appreciated and if need be I can post the scripts I'm using.
(I did a search on the forums for similiar issues but nothing came up -- if I'm missing it please feel free to point me in the right direction.)
Custom Companion Following in Camp
Débuté par
mordy_was_here
, août 05 2012 03:22
#1
Posté 05 août 2012 - 03:22
#2
Posté 05 août 2012 - 10:16
(Just to let you know, those scripts are very old versions of the ones I used to use. They're mostly untested and out-of-date. I'm not sure it's wise to rely on that tutorial. It just sort of gets you started in the right direction. I should probably update it if people are actually using it...)
Can you post your script (the one that deals with camp)? Also does the toolset spit out an error when you try to compile that script? If so, what is the error?
Can you post your script (the one that deals with camp)? Also does the toolset spit out an error when you try to compile that script? If so, what is the error?
Modifié par satans_karma, 05 août 2012 - 10:24 .
#3
Posté 05 août 2012 - 10:45
Ah, I didn't realize it's out of date. At the moment I'm using the default camp script, as I was unsure of what I needed to add to it, though I figured that's where the issues were stemming from. Just to test things out, I set it to fire her when she was in camp, which sorta worked and then broke a whole lot of other stuff pertaining to her. My only other camp script is from that tutorial (no errors with it) -
#include "utility_h"
#include "wrappers_h"
#include "party_h"
#include "camp_functions_h"
#include "plt_gen00pt_party_rivka"
void main()
{
object oFollower = GetObjectByTag("aud_rivka2");
//Follower's position <--- you should change vector below to your desired position in camp
vector vTent = Vector(138.564f, 111.815f, -1.08586f);
location lTent = Location(GetArea(GetHero()), vTent, 180.0f);
command cMoveFollower = CommandJumpToLocation(lTent);
Camp_PlaceFollowersInCamp();
if(GetFollowerState(oFollower) != FOLLOWER_STATE_ACTIVE)
{
SetFollowerState(oFollower, FOLLOWER_STATE_AVAILABLE);
AddCommand(oFollower, cMoveFollower);
WR_SetObjectActive(oFollower, TRUE);
WR_SetPlotFlag(PLT_GEN00PT_PARTY_RIVKA, RIVKA_IN_PARTY, FALSE, FALSE);
WR_SetPlotFlag(PLT_GEN00PT_PARTY_RIVKA, RIVKA_IN_CAMP, TRUE, FALSE);
}
else
{
SetFollowerState(oFollower, FOLLOWER_STATE_AVAILABLE);
AddCommand(oFollower, cMoveFollower);
WR_SetObjectActive(oFollower, TRUE);
WR_SetPlotFlag(PLT_GEN00PT_PARTY_RIVKA, RIVKA_IN_PARTY, FALSE, FALSE);
WR_SetPlotFlag(PLT_GEN00PT_PARTY_RIVKA, RIVKA_IN_CAMP, TRUE, FALSE);
}
}
From trial and error it seems like it's something I need to add to the default camp script, I just have no idea what it is. :/
Edit: Here's the default camp script as well, just in case.
//==============================================================================
/*
cam000ar_all_camps.nss
Camp area script - This script should be used for all camp areas.
*/
//==============================================================================
#include "log_h"
#include "utility_h"
#include "wrappers_h"
#include "events_h"
#include "2da_constants_h"
#include "camp_constants_h"
#include "camp_functions_h"
#include "campaign_h"
#include "cutscenes_h"
#include "global_objects_h"
#include "sys_injury"
#include "party_h"
#include "plt_cod_cha_leliana"
#include "plt_cod_cha_wynne"
#include "plt_cod_mgc_enchantment"
#include "plt_mnp000pt_generic"
#include "plt_mnp000pt_main_rumour"
#include "plt_mnp000pt_camp_events"
#include "plt_mnp000pt_main_events"
#include "plt_gen00pt_party"
#include "plt_genpt_app_leliana"
#include "plt_genpt_app_oghren"
#include "plt_genpt_app_wynne"
#include "plt_genpt_leliana_main"
#include "plt_genpt_oghren_main"
#include "plt_genpt_oghren_events"
#include "plt_tut_party_camp"
#include "plt_ntb000pt_main"
#include "plt_orzpt_main"
#include "plt_arl000pt_contact_eamon"
#include "plt_cir000pt_main"
#include "plt_pre100pt_generic"
//------------------------------------------------------------------------------
void main()
{
event ev = GetCurrentEvent();
int nEventType = GetEventType(ev);
string sDebug;
object oPC = GetHero();
object [] arParty = GetPartyPoolList();
int nSize = GetArraySize(arParty);
int nLoop;
switch(nEventType)
{
case EVENT_TYPE_AREALOAD_SPECIAL:
{
// if camp3 (archdemon event) then fire cutscene
// can be entered only once
if(GetTag(OBJECT_SELF) == "cam110ar_camp_arch3")
{
WR_SetPlotFlag(PLT_MNP000PT_MAIN_EVENTS, ARCHDEMON_EVENT_TWO, TRUE);
Log_Trace(LOG_CHANNEL_PLOT, GetCurrentScriptName(), "WORLD MAP: triggering Archdemon event II (cutscene) ");
CS_LoadCutscene(CUTSCENE_ARCHDEMON_EVENT_TWO);
}
break;
}
//----------------------------------------------------------------------
// Sent by: The engine
// When: all game objects in the area have loaded
//----------------------------------------------------------------------
case EVENT_TYPE_AREALOAD_PRELOADEXIT:
{
object oParty = GetParty(oPC);
object oBodahn = UT_GetNearestCreatureByTag(oPC,CAMP_BODAHN);
object oSandal = UT_GetNearestCreatureByTag(oPC,CAMP_SANDAL);
object oWagon = UT_GetNearestObjectByTag(oPC, CAMP_PL_WAGON);
object oNug = UT_GetNearestObjectByTag(oPC, CAMP_NUG);
object oEmissaryDalish = UT_GetNearestCreatureByTag(oPC, CAMP_EMISSARY_DALISH);
object oEmissaryDwarf = UT_GetNearestCreatureByTag(oPC, CAMP_EMISSARY_DWARF);
object oEmissaryEamon = UT_GetNearestCreatureByTag(oPC, CAMP_EMISSARY_EAMON);
object oEmissaryTranquil = UT_GetNearestCreatureByTag(oPC, CAMP_EMISSARY_TRANQUIL);
object oEmissaryWerewolf = UT_GetNearestCreatureByTag(oPC, CAMP_EMISSARY_WEREWOLF);
object oSupplyCrate = UT_GetNearestObjectByTag(oPC, CAMP_PL_ALLIED_SUPPLIES);
object [] arParty = GetPartyPoolList();
int nSize = GetArraySize(arParty);
int nLoop;
string sAreaTag = GetTag(OBJECT_SELF);
Log_Trace(LOG_CHANNEL_SYSTEMS, "cam000ar_all_camps.main", "CAMP AREA FINISHED LOADING");
InitHeartbeat(oPC, CONFIG_CONSTANT_HEARTBEAT_RATE); // Not really needed. Added as an extra line of defense.
Camp_PlaceFollowersInCamp();
object oMap = GetObjectByTag(WM_WOW_TAG);
object oCampLocation = GetObjectByTag(WML_WOW_CAMP);
SetWorldMapPlayerLocation(oMap, oCampLocation);
// If the shriek encounter is going to happen.
if(sAreaTag == CAM_AR_ARCH3)
{
for(nLoop = 0; nLoop < nSize; nLoop++)
{
// This is so the party member will die, but not corpse decay.
SetEventScript(arParty[nLoop], RESOURCE_SCRIPT_PLAYER_CORE);
// The party cannot be immortal.
SetImmortal(arParty[nLoop], FALSE);
}
}
//object oLothering = GetObjectByTag(WML_WOW_LOTHERING);
//WR_SetWorldMapLocationStatus(oLothering, WM_LOCATION_ACTIVE);
int nBodahnLeaves = WR_GetPlotFlag( PLT_MNP000PT_MAIN_RUMOUR, MAIN_RUMOUR_BODAHN_LEAVES_PERMANENTLY);
int nBodahnRescued = WR_GetPlotFlag( PLT_MNP000PT_MAIN_RUMOUR, MAIN_RUMOUR_BODAHN_RESCUED);
int nNug = WR_GetPlotFlag( PLT_GENPT_LELIANA_MAIN, LELIANA_MIAN_LELIANA_HAS_NUG);
// Did Leliana recieve her gift Nug
if (nNug)
SetObjectActive(oNug, TRUE);
// Check if Wynne is warm for Codex Entry
if ((WR_GetPlotFlag(PLT_GENPT_APP_WYNNE, APP_WYNNE_IS_WARM)) &&
((WR_GetPlotFlag(PLT_COD_CHA_WYNNE, COD_CHA_WYNNE_QUOTE_2) == FALSE)))
{
WR_SetPlotFlag(PLT_COD_CHA_WYNNE, COD_CHA_WYNNE_QUOTE_1, FALSE);
WR_SetPlotFlag(PLT_COD_CHA_WYNNE, COD_CHA_WYNNE_QUOTE_2, TRUE);
}
// Check if Leliana is Adore
if (WR_GetPlotFlag(PLT_GENPT_APP_LELIANA, APP_LELIANA_IS_ADORE) == TRUE)
{
WR_SetPlotFlag(PLT_COD_CHA_LELIANA, COD_CHA_LELIANA_ROMANCE_QUOTE, TRUE);
WR_SetPlotFlag(PLT_COD_CHA_LELIANA, COD_CHA_LELIANA_INITIAL_QUOTE, FALSE);
}
if((nBodahnLeaves == FALSE) && (nBodahnRescued == TRUE) && !(sAreaTag == CAM_AR_ARCH3))
{
int bSandalTalkedTo = WR_GetPlotFlag(PLT_COD_MGC_ENCHANTMENT, CAMP_GO_TALK_TO_SANDAL);
// Check to see if Sandal has been talked to for the Enchantment codex quest.
if(bSandalTalkedTo == FALSE)
{
WR_SetPlotFlag(PLT_COD_MGC_ENCHANTMENT, CAMP_GO_TALK_TO_SANDAL, TRUE, TRUE);
}
WR_SetObjectActive(oWagon, TRUE);
if(GetObjectActive(oSandal) == FALSE)
{
WR_SetObjectActive(oSandal,TRUE);
}
if(GetObjectActive(oBodahn) == FALSE)
{
WR_SetObjectActive(oBodahn,TRUE);
}
}
if(nBodahnLeaves == TRUE)
{
WR_SetObjectActive(oWagon, FALSE);
if(GetObjectActive(oSandal) == TRUE)
{
WR_SetObjectActive(oSandal,FALSE);
}
if(GetObjectActive(oBodahn) == TRUE)
{
WR_SetObjectActive(oBodahn,FALSE);
}
}
//Light Content - Stocking the Camp
//Check for Dalish Emissary or Werewolf Emissary
if (WR_GetPlotFlag(PLT_NTB000PT_MAIN, NTB_MAIN_ELVES_PROMISED_ALLIANCE) == TRUE)
{
SetObjectInteractive(oSupplyCrate, TRUE);
WR_SetObjectActive(oEmissaryDalish, TRUE);
}
else if (WR_GetPlotFlag(PLT_NTB000PT_MAIN, NTB_MAIN_WEREWOLVES_PROMISED_ALLIANCE) == TRUE)
{
SetObjectInteractive(oSupplyCrate, TRUE);
WR_SetObjectActive(oEmissaryWerewolf, TRUE);
}
//Check for Dwarf Emissary
if (WR_GetPlotFlag(PLT_ORZPT_MAIN, ORZ_MAIN___PLOT_DONE, TRUE) == TRUE)
{
SetObjectInteractive(oSupplyCrate, TRUE);
WR_SetObjectActive(oEmissaryDwarf, TRUE);
}
//Check for Eamon Emissary
if (WR_GetPlotFlag(PLT_ARL000PT_CONTACT_EAMON, ARL_CONTACT_EAMON_EAMON_REVIVED) == TRUE)
{
SetObjectInteractive(oSupplyCrate, TRUE);
WR_SetObjectActive(oEmissaryEamon, TRUE);
}
//Check for Tranquil Emissary
if (WR_GetPlotFlag(PLT_CIR000PT_MAIN, MAGES_IN_ARMY) == TRUE || WR_GetPlotFlag(PLT_CIR000PT_MAIN, TEMPLARS_IN_ARMY) == TRUE)
{
SetObjectInteractive(oSupplyCrate, TRUE);
WR_SetObjectActive(oEmissaryTranquil, TRUE);
}
// Deset Camp flag for Leliana
WR_SetPlotFlag(PLT_GENPT_LELIANA_MAIN, LELIANA_MAIN_STILL_IN_CAMP, FALSE);
//checks if Oghren is in Crisis
int nOghrenCrisis = WR_GetPlotFlag(PLT_GENPT_APP_OGHREN,APP_OGHREN_IS_CRISIS,TRUE);
if(nOghrenCrisis == TRUE)
{
int nOghrenOnce = WR_GetPlotFlag(PLT_GENPT_OGHREN_MAIN,OGHREN_MAIN_CRISIS_ONCE);
int nOghrenGone = WR_GetPlotFlag(PLT_GENPT_OGHREN_MAIN,OGHREN_MAIN_LEAVES_FOR_GOOD);
int nOghrenKilled = WR_GetPlotFlag(PLT_GENPT_OGHREN_MAIN,OGHREN_MAIN_KILLED);
if(nOghrenOnce == FALSE)
{
WR_SetPlotFlag(PLT_GENPT_OGHREN_EVENTS,OGHREN_EVENT_CRISIS,TRUE);
}
else if((nOghrenGone == FALSE) && (nOghrenKilled == FALSE))
{
WR_SetPlotFlag(PLT_GENPT_OGHREN_EVENTS,OGHREN_EVENT_CRISIS_AGAIN,TRUE);
}
}
RevealCurrentMap();
// Next - dialog events
// All the logic is inside the 'party_camp' dialog - all this script
// needs to do is trigger the dialog. If any follower has something to say
// the dialog will trigger, otherwise - nothing will happen
// Triggering the camp dialog only if the what-to-do-next dialog already fired in Lothering (by entering it)
if(GetTag(OBJECT_SELF) == "cam104ar_camp_arch1" &&
WR_GetPlotFlag( PLT_MNP000PT_MAIN_EVENTS, PLAYER_ENTERED_LOTHERING))
{
CS_LoadCutscene(CUTSCENE_ARCHDEMON_EVENT_ONE, PLT_MNP000PT_CAMP_EVENTS, CAMP_EVENT_TALK_ABOUT_DREAM);
}
else if(WR_GetPlotFlag( PLT_MNP000PT_MAIN_EVENTS, PLAYER_ENTERED_LOTHERING))
UT_Talk(oPC, oPC, GEN_DL_CAMP_EVENTS);
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:
{
Injury_RemoveAllInjuriesFromParty();
//Activate First Party Camp Tutorial.
WR_SetPlotFlag(PLT_TUT_PARTY_CAMP, TUT_FIRST_PARTY_CAMP, TRUE);
break;
}
//----------------------------------------------------------------------
// Sent by: The engine
// When: A creature enters the area
//----------------------------------------------------------------------
case EVENT_TYPE_ENTER:
{
object oCreature = GetEventCreator(ev);
Log_Trace(LOG_CHANNEL_SYSTEMS, "cam000ar_all_camps.main", "OBJECT ENTERING CAMP");
WR_SetPlotFlag(PLT_MNP000PT_GENERIC, MAIN_PLOT_GENERIC_PARTY_AT_CAMP, TRUE);
if (WR_GetPlotFlag(PLT_PRE100PT_GENERIC, PRE_GENERIC_PARTY_LEFT_PRELUDE_AREAS) == FALSE)
{
WR_SetPlotFlag(PLT_PRE100PT_GENERIC, PRE_GENERIC_PARTY_LEFT_PRELUDE_AREAS, TRUE);
}
break;
}
//----------------------------------------------------------------------
// Sent by: The engine
// When: A creature exits the area
//----------------------------------------------------------------------
case EVENT_TYPE_EXIT:
{
object oCreature = GetEventCreator(ev);
Log_Trace(LOG_CHANNEL_SYSTEMS, "cam000ar_all_camps.main", "OBJECT LEAVING CAMP");
if(IsFollower(oCreature))
{
WR_SetPlotFlag(PLT_MNP000PT_GENERIC, MAIN_PLOT_GENERIC_PARTY_AT_CAMP, FALSE);
// The party picker GUI is triggered in sp_module just before the area transition call
// ShowPartyPickerGUI();
}
break;
}
case EVENT_TYPE_TEAM_DESTROYED:
{
int nTeamID = GetEventInteger(ev, 0); // Team ID
switch(nTeamID)
{
case CAMP_TEAM_DARKSPAWN_CAMP_ATTACKERS: // Shrieks
{
Log_Trace(LOG_CHANNEL_PLOT, GetCurrentScriptName(), "Shriek attackers died - triggering Tamlen if present");
object oTamlen = GetObjectByTag(CAMP_DARKSPAWN_TAMLEN);
for(nLoop = 0; nLoop < nSize; nLoop++)
{
// If any of the party died, resurrect them.
if(IsDeadOrDying(arParty[nLoop]))
{
ResurrectCreature(arParty[nLoop]);
}
}
if(IsObjectValid(oTamlen) && GetObjectActive(oTamlen) == TRUE)
{
UT_Talk(oTamlen, oPC);
}
else
{
// Trigger the party reactions to having been attacked.
object oAlistair = GetObjectByTag(GEN_FL_ALISTAIR);
UT_Talk(oAlistair, oPC, CAM_POST_SHRIEK_ATTACK);
}
break;
}
case CAMP_TEAM_TAMLEN:
{
object oAlistair = GetObjectByTag(GEN_FL_ALISTAIR);
UT_Talk(oAlistair, oPC, CAM_POST_SHRIEK_ATTACK);
}
}
break;
}
}
HandleEvent(ev, RESOURCE_SCRIPT_AREA_CORE);
}
#include "utility_h"
#include "wrappers_h"
#include "party_h"
#include "camp_functions_h"
#include "plt_gen00pt_party_rivka"
void main()
{
object oFollower = GetObjectByTag("aud_rivka2");
//Follower's position <--- you should change vector below to your desired position in camp
vector vTent = Vector(138.564f, 111.815f, -1.08586f);
location lTent = Location(GetArea(GetHero()), vTent, 180.0f);
command cMoveFollower = CommandJumpToLocation(lTent);
Camp_PlaceFollowersInCamp();
if(GetFollowerState(oFollower) != FOLLOWER_STATE_ACTIVE)
{
SetFollowerState(oFollower, FOLLOWER_STATE_AVAILABLE);
AddCommand(oFollower, cMoveFollower);
WR_SetObjectActive(oFollower, TRUE);
WR_SetPlotFlag(PLT_GEN00PT_PARTY_RIVKA, RIVKA_IN_PARTY, FALSE, FALSE);
WR_SetPlotFlag(PLT_GEN00PT_PARTY_RIVKA, RIVKA_IN_CAMP, TRUE, FALSE);
}
else
{
SetFollowerState(oFollower, FOLLOWER_STATE_AVAILABLE);
AddCommand(oFollower, cMoveFollower);
WR_SetObjectActive(oFollower, TRUE);
WR_SetPlotFlag(PLT_GEN00PT_PARTY_RIVKA, RIVKA_IN_PARTY, FALSE, FALSE);
WR_SetPlotFlag(PLT_GEN00PT_PARTY_RIVKA, RIVKA_IN_CAMP, TRUE, FALSE);
}
}
From trial and error it seems like it's something I need to add to the default camp script, I just have no idea what it is. :/
Edit: Here's the default camp script as well, just in case.
//==============================================================================
/*
cam000ar_all_camps.nss
Camp area script - This script should be used for all camp areas.
*/
//==============================================================================
#include "log_h"
#include "utility_h"
#include "wrappers_h"
#include "events_h"
#include "2da_constants_h"
#include "camp_constants_h"
#include "camp_functions_h"
#include "campaign_h"
#include "cutscenes_h"
#include "global_objects_h"
#include "sys_injury"
#include "party_h"
#include "plt_cod_cha_leliana"
#include "plt_cod_cha_wynne"
#include "plt_cod_mgc_enchantment"
#include "plt_mnp000pt_generic"
#include "plt_mnp000pt_main_rumour"
#include "plt_mnp000pt_camp_events"
#include "plt_mnp000pt_main_events"
#include "plt_gen00pt_party"
#include "plt_genpt_app_leliana"
#include "plt_genpt_app_oghren"
#include "plt_genpt_app_wynne"
#include "plt_genpt_leliana_main"
#include "plt_genpt_oghren_main"
#include "plt_genpt_oghren_events"
#include "plt_tut_party_camp"
#include "plt_ntb000pt_main"
#include "plt_orzpt_main"
#include "plt_arl000pt_contact_eamon"
#include "plt_cir000pt_main"
#include "plt_pre100pt_generic"
//------------------------------------------------------------------------------
void main()
{
event ev = GetCurrentEvent();
int nEventType = GetEventType(ev);
string sDebug;
object oPC = GetHero();
object [] arParty = GetPartyPoolList();
int nSize = GetArraySize(arParty);
int nLoop;
switch(nEventType)
{
case EVENT_TYPE_AREALOAD_SPECIAL:
{
// if camp3 (archdemon event) then fire cutscene
// can be entered only once
if(GetTag(OBJECT_SELF) == "cam110ar_camp_arch3")
{
WR_SetPlotFlag(PLT_MNP000PT_MAIN_EVENTS, ARCHDEMON_EVENT_TWO, TRUE);
Log_Trace(LOG_CHANNEL_PLOT, GetCurrentScriptName(), "WORLD MAP: triggering Archdemon event II (cutscene) ");
CS_LoadCutscene(CUTSCENE_ARCHDEMON_EVENT_TWO);
}
break;
}
//----------------------------------------------------------------------
// Sent by: The engine
// When: all game objects in the area have loaded
//----------------------------------------------------------------------
case EVENT_TYPE_AREALOAD_PRELOADEXIT:
{
object oParty = GetParty(oPC);
object oBodahn = UT_GetNearestCreatureByTag(oPC,CAMP_BODAHN);
object oSandal = UT_GetNearestCreatureByTag(oPC,CAMP_SANDAL);
object oWagon = UT_GetNearestObjectByTag(oPC, CAMP_PL_WAGON);
object oNug = UT_GetNearestObjectByTag(oPC, CAMP_NUG);
object oEmissaryDalish = UT_GetNearestCreatureByTag(oPC, CAMP_EMISSARY_DALISH);
object oEmissaryDwarf = UT_GetNearestCreatureByTag(oPC, CAMP_EMISSARY_DWARF);
object oEmissaryEamon = UT_GetNearestCreatureByTag(oPC, CAMP_EMISSARY_EAMON);
object oEmissaryTranquil = UT_GetNearestCreatureByTag(oPC, CAMP_EMISSARY_TRANQUIL);
object oEmissaryWerewolf = UT_GetNearestCreatureByTag(oPC, CAMP_EMISSARY_WEREWOLF);
object oSupplyCrate = UT_GetNearestObjectByTag(oPC, CAMP_PL_ALLIED_SUPPLIES);
object [] arParty = GetPartyPoolList();
int nSize = GetArraySize(arParty);
int nLoop;
string sAreaTag = GetTag(OBJECT_SELF);
Log_Trace(LOG_CHANNEL_SYSTEMS, "cam000ar_all_camps.main", "CAMP AREA FINISHED LOADING");
InitHeartbeat(oPC, CONFIG_CONSTANT_HEARTBEAT_RATE); // Not really needed. Added as an extra line of defense.
Camp_PlaceFollowersInCamp();
object oMap = GetObjectByTag(WM_WOW_TAG);
object oCampLocation = GetObjectByTag(WML_WOW_CAMP);
SetWorldMapPlayerLocation(oMap, oCampLocation);
// If the shriek encounter is going to happen.
if(sAreaTag == CAM_AR_ARCH3)
{
for(nLoop = 0; nLoop < nSize; nLoop++)
{
// This is so the party member will die, but not corpse decay.
SetEventScript(arParty[nLoop], RESOURCE_SCRIPT_PLAYER_CORE);
// The party cannot be immortal.
SetImmortal(arParty[nLoop], FALSE);
}
}
//object oLothering = GetObjectByTag(WML_WOW_LOTHERING);
//WR_SetWorldMapLocationStatus(oLothering, WM_LOCATION_ACTIVE);
int nBodahnLeaves = WR_GetPlotFlag( PLT_MNP000PT_MAIN_RUMOUR, MAIN_RUMOUR_BODAHN_LEAVES_PERMANENTLY);
int nBodahnRescued = WR_GetPlotFlag( PLT_MNP000PT_MAIN_RUMOUR, MAIN_RUMOUR_BODAHN_RESCUED);
int nNug = WR_GetPlotFlag( PLT_GENPT_LELIANA_MAIN, LELIANA_MIAN_LELIANA_HAS_NUG);
// Did Leliana recieve her gift Nug
if (nNug)
SetObjectActive(oNug, TRUE);
// Check if Wynne is warm for Codex Entry
if ((WR_GetPlotFlag(PLT_GENPT_APP_WYNNE, APP_WYNNE_IS_WARM)) &&
((WR_GetPlotFlag(PLT_COD_CHA_WYNNE, COD_CHA_WYNNE_QUOTE_2) == FALSE)))
{
WR_SetPlotFlag(PLT_COD_CHA_WYNNE, COD_CHA_WYNNE_QUOTE_1, FALSE);
WR_SetPlotFlag(PLT_COD_CHA_WYNNE, COD_CHA_WYNNE_QUOTE_2, TRUE);
}
// Check if Leliana is Adore
if (WR_GetPlotFlag(PLT_GENPT_APP_LELIANA, APP_LELIANA_IS_ADORE) == TRUE)
{
WR_SetPlotFlag(PLT_COD_CHA_LELIANA, COD_CHA_LELIANA_ROMANCE_QUOTE, TRUE);
WR_SetPlotFlag(PLT_COD_CHA_LELIANA, COD_CHA_LELIANA_INITIAL_QUOTE, FALSE);
}
if((nBodahnLeaves == FALSE) && (nBodahnRescued == TRUE) && !(sAreaTag == CAM_AR_ARCH3))
{
int bSandalTalkedTo = WR_GetPlotFlag(PLT_COD_MGC_ENCHANTMENT, CAMP_GO_TALK_TO_SANDAL);
// Check to see if Sandal has been talked to for the Enchantment codex quest.
if(bSandalTalkedTo == FALSE)
{
WR_SetPlotFlag(PLT_COD_MGC_ENCHANTMENT, CAMP_GO_TALK_TO_SANDAL, TRUE, TRUE);
}
WR_SetObjectActive(oWagon, TRUE);
if(GetObjectActive(oSandal) == FALSE)
{
WR_SetObjectActive(oSandal,TRUE);
}
if(GetObjectActive(oBodahn) == FALSE)
{
WR_SetObjectActive(oBodahn,TRUE);
}
}
if(nBodahnLeaves == TRUE)
{
WR_SetObjectActive(oWagon, FALSE);
if(GetObjectActive(oSandal) == TRUE)
{
WR_SetObjectActive(oSandal,FALSE);
}
if(GetObjectActive(oBodahn) == TRUE)
{
WR_SetObjectActive(oBodahn,FALSE);
}
}
//Light Content - Stocking the Camp
//Check for Dalish Emissary or Werewolf Emissary
if (WR_GetPlotFlag(PLT_NTB000PT_MAIN, NTB_MAIN_ELVES_PROMISED_ALLIANCE) == TRUE)
{
SetObjectInteractive(oSupplyCrate, TRUE);
WR_SetObjectActive(oEmissaryDalish, TRUE);
}
else if (WR_GetPlotFlag(PLT_NTB000PT_MAIN, NTB_MAIN_WEREWOLVES_PROMISED_ALLIANCE) == TRUE)
{
SetObjectInteractive(oSupplyCrate, TRUE);
WR_SetObjectActive(oEmissaryWerewolf, TRUE);
}
//Check for Dwarf Emissary
if (WR_GetPlotFlag(PLT_ORZPT_MAIN, ORZ_MAIN___PLOT_DONE, TRUE) == TRUE)
{
SetObjectInteractive(oSupplyCrate, TRUE);
WR_SetObjectActive(oEmissaryDwarf, TRUE);
}
//Check for Eamon Emissary
if (WR_GetPlotFlag(PLT_ARL000PT_CONTACT_EAMON, ARL_CONTACT_EAMON_EAMON_REVIVED) == TRUE)
{
SetObjectInteractive(oSupplyCrate, TRUE);
WR_SetObjectActive(oEmissaryEamon, TRUE);
}
//Check for Tranquil Emissary
if (WR_GetPlotFlag(PLT_CIR000PT_MAIN, MAGES_IN_ARMY) == TRUE || WR_GetPlotFlag(PLT_CIR000PT_MAIN, TEMPLARS_IN_ARMY) == TRUE)
{
SetObjectInteractive(oSupplyCrate, TRUE);
WR_SetObjectActive(oEmissaryTranquil, TRUE);
}
// Deset Camp flag for Leliana
WR_SetPlotFlag(PLT_GENPT_LELIANA_MAIN, LELIANA_MAIN_STILL_IN_CAMP, FALSE);
//checks if Oghren is in Crisis
int nOghrenCrisis = WR_GetPlotFlag(PLT_GENPT_APP_OGHREN,APP_OGHREN_IS_CRISIS,TRUE);
if(nOghrenCrisis == TRUE)
{
int nOghrenOnce = WR_GetPlotFlag(PLT_GENPT_OGHREN_MAIN,OGHREN_MAIN_CRISIS_ONCE);
int nOghrenGone = WR_GetPlotFlag(PLT_GENPT_OGHREN_MAIN,OGHREN_MAIN_LEAVES_FOR_GOOD);
int nOghrenKilled = WR_GetPlotFlag(PLT_GENPT_OGHREN_MAIN,OGHREN_MAIN_KILLED);
if(nOghrenOnce == FALSE)
{
WR_SetPlotFlag(PLT_GENPT_OGHREN_EVENTS,OGHREN_EVENT_CRISIS,TRUE);
}
else if((nOghrenGone == FALSE) && (nOghrenKilled == FALSE))
{
WR_SetPlotFlag(PLT_GENPT_OGHREN_EVENTS,OGHREN_EVENT_CRISIS_AGAIN,TRUE);
}
}
RevealCurrentMap();
// Next - dialog events
// All the logic is inside the 'party_camp' dialog - all this script
// needs to do is trigger the dialog. If any follower has something to say
// the dialog will trigger, otherwise - nothing will happen
// Triggering the camp dialog only if the what-to-do-next dialog already fired in Lothering (by entering it)
if(GetTag(OBJECT_SELF) == "cam104ar_camp_arch1" &&
WR_GetPlotFlag( PLT_MNP000PT_MAIN_EVENTS, PLAYER_ENTERED_LOTHERING))
{
CS_LoadCutscene(CUTSCENE_ARCHDEMON_EVENT_ONE, PLT_MNP000PT_CAMP_EVENTS, CAMP_EVENT_TALK_ABOUT_DREAM);
}
else if(WR_GetPlotFlag( PLT_MNP000PT_MAIN_EVENTS, PLAYER_ENTERED_LOTHERING))
UT_Talk(oPC, oPC, GEN_DL_CAMP_EVENTS);
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:
{
Injury_RemoveAllInjuriesFromParty();
//Activate First Party Camp Tutorial.
WR_SetPlotFlag(PLT_TUT_PARTY_CAMP, TUT_FIRST_PARTY_CAMP, TRUE);
break;
}
//----------------------------------------------------------------------
// Sent by: The engine
// When: A creature enters the area
//----------------------------------------------------------------------
case EVENT_TYPE_ENTER:
{
object oCreature = GetEventCreator(ev);
Log_Trace(LOG_CHANNEL_SYSTEMS, "cam000ar_all_camps.main", "OBJECT ENTERING CAMP");
WR_SetPlotFlag(PLT_MNP000PT_GENERIC, MAIN_PLOT_GENERIC_PARTY_AT_CAMP, TRUE);
if (WR_GetPlotFlag(PLT_PRE100PT_GENERIC, PRE_GENERIC_PARTY_LEFT_PRELUDE_AREAS) == FALSE)
{
WR_SetPlotFlag(PLT_PRE100PT_GENERIC, PRE_GENERIC_PARTY_LEFT_PRELUDE_AREAS, TRUE);
}
break;
}
//----------------------------------------------------------------------
// Sent by: The engine
// When: A creature exits the area
//----------------------------------------------------------------------
case EVENT_TYPE_EXIT:
{
object oCreature = GetEventCreator(ev);
Log_Trace(LOG_CHANNEL_SYSTEMS, "cam000ar_all_camps.main", "OBJECT LEAVING CAMP");
if(IsFollower(oCreature))
{
WR_SetPlotFlag(PLT_MNP000PT_GENERIC, MAIN_PLOT_GENERIC_PARTY_AT_CAMP, FALSE);
// The party picker GUI is triggered in sp_module just before the area transition call
// ShowPartyPickerGUI();
}
break;
}
case EVENT_TYPE_TEAM_DESTROYED:
{
int nTeamID = GetEventInteger(ev, 0); // Team ID
switch(nTeamID)
{
case CAMP_TEAM_DARKSPAWN_CAMP_ATTACKERS: // Shrieks
{
Log_Trace(LOG_CHANNEL_PLOT, GetCurrentScriptName(), "Shriek attackers died - triggering Tamlen if present");
object oTamlen = GetObjectByTag(CAMP_DARKSPAWN_TAMLEN);
for(nLoop = 0; nLoop < nSize; nLoop++)
{
// If any of the party died, resurrect them.
if(IsDeadOrDying(arParty[nLoop]))
{
ResurrectCreature(arParty[nLoop]);
}
}
if(IsObjectValid(oTamlen) && GetObjectActive(oTamlen) == TRUE)
{
UT_Talk(oTamlen, oPC);
}
else
{
// Trigger the party reactions to having been attacked.
object oAlistair = GetObjectByTag(GEN_FL_ALISTAIR);
UT_Talk(oAlistair, oPC, CAM_POST_SHRIEK_ATTACK);
}
break;
}
case CAMP_TEAM_TAMLEN:
{
object oAlistair = GetObjectByTag(GEN_FL_ALISTAIR);
UT_Talk(oAlistair, oPC, CAM_POST_SHRIEK_ATTACK);
}
}
break;
}
}
HandleEvent(ev, RESOURCE_SCRIPT_AREA_CORE);
}
Modifié par Mel213, 05 août 2012 - 10:50 .
#4
Posté 05 août 2012 - 11:07
You can remove the "Camp_PlaceFollowersInCamp();" from your script. I was using that temporarily at that time to counteract some weird bug I was having with Leliana.
Have you set up your GDA file (the excel thing) yet? The script won't run when you enter camp without it.
EDIT: You shouldn't need to change the default scripts. You can just about always use PRCSCR method instead.
In the current version of my scripts, I use a custom function that looks like this:
__________________________________________________________________
object oFollower = GetObjectByTag("INSERT TAG OF FOLLOWER HERE");
//Follower's camp position near....
vector vFollowerCamp = Vector(135.424f, 124.962f, -0.253687f);
location lFollowerCamp = Location(GetArea(GetHero()), vFollowerCamp, -130.2f);
command cMoveFollowerCamp = CommandJumpToLocation(lFollowerCamp);
//Follower's Redcliffe position near...
vector vFollowerRed = Vector(32.3337f, -26.7351f, 0.401679f);
location lFollowerRed = Location(GetArea(GetHero()), vFollowerRed, 30.0f);
command cMoveFollowerRed = CommandJumpToLocation(lFollowerRed);
//Follower's Denerim position near...
vector vFollowerDen = Vector(79.0577f, -9.56501f, 5.02284f);
location lFollowerDen = Location(GetArea(GetHero()), vFollowerDen, 180.0f);
command cMoveFollowerDen = CommandJumpToLocation(lFollowerDen);
SetFollowerState(oFollower, FOLLOWER_STATE_AVAILABLE);
WR_SetObjectActive(oFollower, TRUE);
SetImmortal(oFollower, TRUE);
RW_CatchUpToPlayer(oFollower);
if (GetTag(oArea) == "cam100ar_camp_plains" || GetTag(oArea) == "cam110ar_camp_arch3" || GetTag(oArea) == "cam104ar_camp_arch1")
{
AddCommand(oFollower, cMoveFollowerCamp);
WR_SetPlotFlag(PLT_GEN00PT_PARTY_XXX, FOLLOWER_IN_PARTY, FALSE, FALSE);
WR_SetPlotFlag(PLT_GEN00PT_PARTY_XXX, FOLLOWER_IN_CAMP, TRUE, FALSE);
}
else if (GetTag(oArea) == "cli300ar_redcliffe_castle")
{
AddCommand(oFollower, cMoveFollowerRed);
WR_SetPlotFlag(PLT_GEN00PT_PARTY_XXX, FOLLOWER_IN_PARTY, FALSE, FALSE);
WR_SetPlotFlag(PLT_GEN00PT_PARTY_XXX, FOLLOWER_IN_CAMP, FALSE, FALSE);
}
else if (GetTag(oArea) == "den211ar_arl_eamon_estate_1")
{
AddCommand(oFollower, cMoveFollowerDen);
WR_SetPlotFlag(PLT_GEN00PT_PARTY_XXX, FOLLOWER_IN_PARTY, FALSE, FALSE);
WR_SetPlotFlag(PLT_GEN00PT_PARTY_XXX, FOLLOWER_IN_CAMP, FALSE, FALSE);
}
_____________________________________________________________________
I think that would work for you too if you put it between "void main {" and the ending "}"
Have you set up your GDA file (the excel thing) yet? The script won't run when you enter camp without it.
EDIT: You shouldn't need to change the default scripts. You can just about always use PRCSCR method instead.
In the current version of my scripts, I use a custom function that looks like this:
__________________________________________________________________
object oFollower = GetObjectByTag("INSERT TAG OF FOLLOWER HERE");
//Follower's camp position near....
vector vFollowerCamp = Vector(135.424f, 124.962f, -0.253687f);
location lFollowerCamp = Location(GetArea(GetHero()), vFollowerCamp, -130.2f);
command cMoveFollowerCamp = CommandJumpToLocation(lFollowerCamp);
//Follower's Redcliffe position near...
vector vFollowerRed = Vector(32.3337f, -26.7351f, 0.401679f);
location lFollowerRed = Location(GetArea(GetHero()), vFollowerRed, 30.0f);
command cMoveFollowerRed = CommandJumpToLocation(lFollowerRed);
//Follower's Denerim position near...
vector vFollowerDen = Vector(79.0577f, -9.56501f, 5.02284f);
location lFollowerDen = Location(GetArea(GetHero()), vFollowerDen, 180.0f);
command cMoveFollowerDen = CommandJumpToLocation(lFollowerDen);
SetFollowerState(oFollower, FOLLOWER_STATE_AVAILABLE);
WR_SetObjectActive(oFollower, TRUE);
SetImmortal(oFollower, TRUE);
RW_CatchUpToPlayer(oFollower);
if (GetTag(oArea) == "cam100ar_camp_plains" || GetTag(oArea) == "cam110ar_camp_arch3" || GetTag(oArea) == "cam104ar_camp_arch1")
{
AddCommand(oFollower, cMoveFollowerCamp);
WR_SetPlotFlag(PLT_GEN00PT_PARTY_XXX, FOLLOWER_IN_PARTY, FALSE, FALSE);
WR_SetPlotFlag(PLT_GEN00PT_PARTY_XXX, FOLLOWER_IN_CAMP, TRUE, FALSE);
}
else if (GetTag(oArea) == "cli300ar_redcliffe_castle")
{
AddCommand(oFollower, cMoveFollowerRed);
WR_SetPlotFlag(PLT_GEN00PT_PARTY_XXX, FOLLOWER_IN_PARTY, FALSE, FALSE);
WR_SetPlotFlag(PLT_GEN00PT_PARTY_XXX, FOLLOWER_IN_CAMP, FALSE, FALSE);
}
else if (GetTag(oArea) == "den211ar_arl_eamon_estate_1")
{
AddCommand(oFollower, cMoveFollowerDen);
WR_SetPlotFlag(PLT_GEN00PT_PARTY_XXX, FOLLOWER_IN_PARTY, FALSE, FALSE);
WR_SetPlotFlag(PLT_GEN00PT_PARTY_XXX, FOLLOWER_IN_CAMP, FALSE, FALSE);
}
_____________________________________________________________________
I think that would work for you too if you put it between "void main {" and the ending "}"
Modifié par satans_karma, 05 août 2012 - 11:26 .
#5
Posté 05 août 2012 - 11:33
Ahah -- I had set up the PRCSCR incorrectly. I went back and did it again after you mentioned the Excels, just to be sure, and she's working perfectly now. I'll take a look at that script you posted as well. Thanks so much, Karma!
#6
Posté 05 août 2012 - 11:36
No problem. The new script takes care of Redcliffe and Denerim "camp" locations as well. The old one does not, so at some point, you will have to change it over.
I updated a couple of the scripts on that tutorial. I didn't have time to fix all of them though.
I updated a couple of the scripts on that tutorial. I didn't have time to fix all of them though.





Retour en haut






