Skip to content

2 questions -

Have a couple of quick questions - 

1) Is there a function that will tell me if a caster has a certain spell. For example if I wanted to know if a caster had Magic Missile ready to cast. (and additionally can you remove it?)

2)  Does NWN handle arrays? If I want to pull "highest kills" from campaign ints per PC, can NWN sort through theses to display name and number? Im running on windows so NWNX isnt a way atm.

Comments

  • FreshLemonBunFreshLemonBun Member Posts: 909
    For the first there is GetHasSpell and for the second you don't have script based arrays. On the other hand you can use objects and local variables with a numeric id in their name to simulate an array, or you can use a string with delimiters or packed in a consistent way to pass a set of values. You should really consider if you actually need an array or if you can do it in a simpler way, for example storing kill count and highest kills as local variables.
  • ProlericProleric Member Posts: 1,316
    There are functions which allow you to manage pseudo-arrays (Set/GetLocalArrayInt, Set/GetLocalArrayString) - see Lexicon. 

    You can even examine the source code if you need to write a custom function for a different data type or multiple indices.
  • vonstormvonstorm Member Posts: 66
    Thank you, that helps.
Sign In or Register to comment.