Fandom

NWN2Wiki

AcquireItem event

3,791pages on
this wiki
Add New Page
Talk0 Share


The OnAcquireItem event has been confirmed by Obsidian Entertainment.


i_*_aq MethodEdit

This method consists of creating a script named i_*_aq with the * being the resreff of the item. This script will then only execute for the item with the name of the Resref("Template Resref"). This is much more effective than editing the player events just to add code for a specific item.

A simple code snipet to try in single player:

void main()
{
	SendMessageToPC(GetFirstPC(),
				"\nItem Acquired: "+GetFirstName(GetModuleItemAcquired())
				+"\nAcquirer: "+GetFirstName(GetModuleItemAcquiredBy())
				);
}

Ad blocker interference detected!


Wikia is a free-to-use site that makes money from advertising. We have a modified experience for viewers using ad blockers

Wikia is not accessible if you’ve made further modifications. Remove the custom ad blocker rule(s) and the page will load as expected.