View Single Post
Old 01-21-2009, 10:16 PM   #7
Star Admiral
N7 Commando
 
Star Admiral's Avatar
 
Join Date: Oct 2008
Location: Omega 4 Relay
Posts: 656
Current Game: Mass Effect 2
Folder extraordinaire Helpful! 
I see two ways of doing this. There's probably more, though. One, you can set a global variable after giving the items. Two, if you plan on giving the player a specific item not found elsewhere on the Endar Spire, you can check for the presence of that item within the player's inventory.

For the first method, you'll need to edit the globalcat.2da file. Add a new Boolean variable at the end of the file. The conditional would look something like this, where xxx is the name of whatever you named your new variable.

Code:
int StartingConditional() {
   if( GetGlobalBoolean( "xxx" ) == TRUE )
      return FALSE;
   return TRUE;
}
You'll also need to add the following line to the script that gives the player items.

Code:
SetGlobalBoolean( "xxx", TRUE );
For the second method, you'll need to make sure that of the items you give the player, there must be at least one that is not normally found on the Endar Spire, or else there might be a chance that the conditional would not work properly. This time, xxx refers to the item's tag.

Code:
int StartingConditional() {
   object oItem = GetFirstItemInInventory( GetFirstPC() );
   while( GetIsObjectValid( oItem ) ) {
      if( GetTag( oItem ) == "xxx" )
         return FALSE;
      oItem = GetNextItemInInventory( GetFirstPC() );
   }
   return TRUE;
}
Hope this helps.

EDIT: The method that HK-42 proposed works well too. Saves the hassle of all the scripts. I'll leave my examples just in case you decide to use them.

- Star Admiral
Star Admiral is offline   you may: quote & reply,