Hi again!
Thanks so much for your helpful commentary on how to make this script work. I've been doing some coding, but I'm having a bit of trouble: the script wizard is not recognizing the custom function that I have made. I am not sure why; it could just be a simple grammatical error or typo that I can't find. I *did* make sure to add the #include line where necessary. I can show you the three scripts that I have working in conjunction with each other. Script #3 is not compling. On the DelayCommand line, I'm getting an "UNKNOWN STATE IN COMPILER" error. Any observations would be very helpful. Thanks!
First script:
“onen_cs_deserteast†(this goes in OnEnter; it executes both the cutscene script [not included here, since it is not relevant] and the custom function)
void main()
{
object oPC = GetEnteringObject();
if (!GetIsPC(oPC))
{ return; }
if (GetLocalInt(oPC,"iCutsceneViewed") > 0)
{ return; }
SetLocalInt(oPC,"iCutsceneViewed",1);
SetLocalObject(GetModule(),"goldvein",oPC);
ExecuteScript("cs_deserteast",GetArea(oPC));
ExecuteScript("fx_deserteast",GetArea(oPC));
}
Second script:
“cf_checkadd†(this script contains the custom function)
void CheckAddJournalEntry(object oPC, string sPlotID, int nState) {
if (GetLocalInt(GetArea(oPC), "edrop")==1) {
AddJournalQuestEntry("find_smug", 1, oPC,TRUE,FALSE);
}
}
Third script:
“fx_deserteast†(this script executes the custom function)
#include "cf_checkadd"
void main()
{
DelayCommand(80.0,CheckAddJournalEntry(object oPC));
}
Modifié par dr. b, 08 août 2013 - 11:21 .