Note: LucasForums Archive Project
The content here was reconstructed by scraping the Wayback Machine in an effort to restore some of what was lost when LF went down. The LucasForums Archive Project claims no ownership over the content or assets that were archived on archive.org.

This project is meant for research purposes only.

scripting help w/inventory - TSL

Page: 1 of 1
 newbiemodder
08-04-2011, 12:11 AM
#1
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.
 Canaan Sadow
08-04-2011, 12:23 AM
#2
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
 Fastmaniac
08-04-2011, 11:33 AM
#3
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); }


}
 newbiemodder
08-04-2011, 12:28 PM
#4
I'll give it a whirl Fastmaniac, thanks
 Qui-Don Jorn
08-05-2011, 10:06 AM
#5
fastmaniacs got it i think.
 Qui-Gon Glenn
08-06-2011, 9:34 PM
#6
fastmaniacs got it i think.
I think so too... you just needed to add an exception rule to your conditional.
 newbiemodder
08-07-2011, 12:47 PM
#7
We're good...thx to all
Page: 1 of 1