Aller au contenu

Photo

Does the script attached to an item run ?


  • Veuillez vous connecter pour répondre
1 réponse à ce sujet

#1
Shade Sharphook

Shade Sharphook
  • Members
  • 60 messages
I've not been able to get the script attached to an item to run under any circumstances. Can't seem to find anything on the wiki, or anywhere else about how to make these work either.

I've managed to use the EVENT_TYPE_UNIQUE_POWER event in a modules script to make an items do things....but this event is sent to the moodules script. Placeables are also easy enough....but not items...
I don't really want to have all item special functions all in the module script, and would much rather have them in the script for the item.

Has anyone managed to make a script attached to an item work, and if so how ??

#2
coreyh2

coreyh2
  • Members
  • 5 messages
In nwn1-2 items don't have unique scripts.There were module events with scripts that check for what item set them off. There was a official work around hack with scripts with special names. You should check OC module's events to see how they handle items.



These are events to look at.

EVENT_TYPE_UNIQUE_POWER

EVENT_TYPE_INVENTORY_REMOVED

EVENT_TYPE_INVENTORY_ADDED

EVENT_TYPE_EQUIP

EVENT_TYPE_UNEQUIP



This is a new one

EVENT_TYPE_CAMPAIGN_ITEM_ACQUIRED