Talk:GetItemPossessedBy
From NWN Lexicon
Is this hard coded? I assume that it is. I ask because my assumption is that it is more efficient than looping through an inventory and checking tags. Anybody else have a clue?--Henesua (talk) 01:21, 3 July 2013 (UTC)
- Im maybe not expert but as a beginner nwnx coder I suspect it is way faster. Even if it would make the same in the hardcode aka looping items comparign tags for each, doing it in nwscript involves several extra commands. Every command in nwscripts call:
- getfunctionbyId (aka nwscript sends just function id and parameters)
- switch by id
- passing parameters into real function used
- sending result back to nwscript
As you can see this step is repeated every time you call getnextitemininventory and gettag. It must be faster imo. --Shadooow (talk) 23:45, 5 July 2013 (UTC)