can anyone let me know where Im falling down here? - Script to set up quest for solo or party. Just added the PC value assignments as Im not sure that faction function includes the PC or just his "other" party members. REM out the if statements to see if they were cause, but not. Compiles fine but doesnt fire from conversation.
#include "x0_i0_partywide"
#include "nw_i0_tool"
#include "pqj_inc"
void main()
{
object oPC = GetLastSpeaker();
string quest = GetLocalString(OBJECT_SELF, "quest");
string questitem = GetLocalString(OBJECT_SELF, "questitem");
string prequest = GetLocalString(OBJECT_SELF, "prequest");
int state;
// do the PC - not sure if needed
state = GetCampaignInt (quest, "state", oPC);
// if (!state > 1)
// {
state = 1;
SendMessageToPC (oPC, "test"); //not showing up!
AddPersistentJournalQuestEntry (quest, state, oPC,FALSE,FALSE);
SetCampaignInt (quest, "state", state, oPC);
// }
// Get the first PC party member
object oPM = GetFirstFactionMember(oPC, TRUE);
CreateItemOnObject(prequest, oPC);
// We stop when there are no more valid PC's in the party.
while(GetIsObjectValid(oPM) == TRUE)
{
// Do something to party member
state = GetCampaignInt (quest, "state", oPM);
if (!state > 1)
{
state = 1;
AddPersistentJournalQuestEntry (quest, state, oPM,FALSE,FALSE);
SetCampaignInt (quest, "state", state, oPM);
}
// Get the next PC member of oPC's faction.
// If we put anything but oPC into this, it may be a totally
// unreliable loop!
oPM = GetNextFactionMember(oPC, TRUE);
}
}
Modifié par nagurtha, 03 février 2013 - 05:13 .