newbiemodder Posted August 4, 2011 Share Posted August 4, 2011 Hey scripting gurus out there, I have a question. I have this script void main () { if (GetIsObjectValid(GetItemPossessedBy(GetFirstPC(), "xxxxxxxx"))) { if (GetIsObjectValid(GetItemPossessedBy(GetFirstPC(), "yyyyyyyy"))) { if (GetIsObjectValid(GetItemPossessedBy(GetFirstPC(), "zzzzzzzz"))) { AddJournalQuestEntry("XYZ",30); }}} } This script is on some placeables that is checked when inventory is disturbed, and when I have all three items journal entry 30 is triggered. Which I want to keep. My question, how do I alter this script so that if I don't have all three items when the placeable is disturbed journal entry 20 is triggered instead? Thanks. Link to comment Share on other sites More sharing options...
Canaan Sadow Posted August 4, 2011 Share Posted August 4, 2011 Hey scripting gurus out there, I have a question. I have this script void main () { if (GetIsObjectValid(GetItemPossessedBy(GetFirstPC(), "xxxxxxxx"))) { if (GetIsObjectValid(GetItemPossessedBy(GetFirstPC(), "yyyyyyyy"))) { if (GetIsObjectValid(GetItemPossessedBy(GetFirstPC(), "zzzzzzzz"))) { AddJournalQuestEntry("XYZ",30); }}} } This script is on some placeables that is checked when inventory is disturbed, and when I have all three items journal entry 30 is triggered. Which I want to keep. My question, how do I alter this script so that if I don't have all three items when the placeable is disturbed journal entry 20 is triggered instead? Thanks. Well you could do the simple thing... make it to where you need only one... so... void main () { if (GetIsObjectValid(GetItemPossessedBy(GetFirstPC(), "xxxxxxxx"))) { AddJournalQuestEntry("XYZ",20); } } Btw I just copied and pasted your script, it may be wrong, I didn't actually search it lol Link to comment Share on other sites More sharing options...
Fastmaniac Posted August 4, 2011 Share Posted August 4, 2011 Hi, I don't know if it works, but you might want to try that: void main () { if (GetIsObjectValid(GetItemPossessedBy(GetFirstPC(), "xxxxxxxx")) && (GetIsObjectValid(GetItemPossessedBy(GetFirstPC(), "yyyyyyyy")) && (GetIsObjectValid(GetItemPossessedBy(GetFirstPC(), "zzzzzzzz"))))) { AddJournalQuestEntry("XYZ",30); } else { AddJournalQuestEntry("XYZ",20); } } Link to comment Share on other sites More sharing options...
newbiemodder Posted August 4, 2011 Author Share Posted August 4, 2011 I'll give it a whirl Fastmaniac, thanks Link to comment Share on other sites More sharing options...
Qui-Don Jorn Posted August 5, 2011 Share Posted August 5, 2011 fastmaniacs got it i think. Link to comment Share on other sites More sharing options...
Qui-Gon Glenn Posted August 7, 2011 Share Posted August 7, 2011 fastmaniacs got it i think. I think so too... you just needed to add an exception rule to your conditional. Link to comment Share on other sites More sharing options...
newbiemodder Posted August 7, 2011 Author Share Posted August 7, 2011 We're good...thx to all Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.