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.
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
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); }
}
I'll give it a whirl Fastmaniac, thanks
fastmaniacs got it i think.
fastmaniacs got it i think.
I think so too... you just needed to add an exception rule to your conditional.