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.

[K1] Conditional Scripts

Page: 1 of 1
 ForeverNight
04-17-2008, 10:02 PM
#1
Alright, I want to preface this one with a statement of my own... That being that I am not totally helpless at modding this game... really! Honestly!

I just can't script to save my life!

So, this time, I'm needing a conditional script that checks to see if I have an item in my inventory. The Item's ResRef is "mw5dp" Yes, not a traditional one, but when have I really used that nomenclature?

So, my question to you is, I've been searching backlogs of here for the conditonal script that checks if you have an item in your inventory... and:

DO YOU KNOW HOW MANY THREADS THERE ARE DEALING WITH THE WORD SCRIPT!!!!!!

There's literally years of the stuff on here!

But, if somebody could whip one up for me, that would be great... that or directing me towards the inventory directional script so I can actually learn and do it myself.

Thanks!
 JCarter426
04-17-2008, 10:14 PM
#2
The K2 scipt file is c_hasitem.nss. Don't know what it is in K1, but that doesn't matter. Here's the body:

int StartingConditional()
{
if ( GetIsObjectValid( GetItemPossessedBy( GetFirstPC(), sTag))) return TRUE;

return FALSE;
}

Where "sTag" is the tag of the item.

I'm no scripting maestro myself, but that should work (I think ;)).
 ForeverNight
04-17-2008, 10:16 PM
#3
Thank you a lot!
 JCarter426
04-17-2008, 10:54 PM
#4
No problem. :)
Page: 1 of 1