Working on a portal system that requires a un-droppable custom item in the PC inventory tagged worldstoneshard
I ultimatly want the item’s local variable ‘bwwp’ added/updated to 1 after entering a trigger.
I’ve placed a trigger around the portal locations.
This is what I got from the script gen tool I use often. But I think it’s pointing at the PC and not the Object.
string sDeny;
/* Script generated by
Lilac Soul's NWN Script Generator, v. 2.3
For download info, please visit:
http://nwvault.ign.com/View.php?view=Other.Detail&id=4683&id=625 */
//Put this script OnEnter
void main()
{
object oPC = GetEnteringObject();
if (!GetIsPC(oPC)) return;
if (GetItemPossessedBy(oPC, "worldstoneshard")== OBJECT_INVALID)
{
sDeny="you are missing something";
SendMessageToPC(oPC, sDeny);
return;
}
SetLocalObject(oPC, "bwwp", 1);
}