Jump to content

what is aiSlotsToSkip (powerofthree's Papyrus Extender,UnequipAllOfType)?


pxd2050

Recommended Posts

powerofthree's Papyrus Extender

Function UnequipAllOfType(Actor akActor, int afArmorType, int[] aiSlotsToSkip) global native

I don't know how to set aiSlotsToSkip

If i want to UnequipAll armor except slot[34], Can someone give me an example?

thank you.

Edited by pxd2050
Link to comment
Share on other sites

aiSlotsToSkip is an integer array. It is therefore expecting an integer array as input into that parameter. You need to create one.

 

This goes in the empty state to declare your new array

Int[] mySlotsToSkip

This goes inside of a function or event that will run prior to your usage of UnequipAllOfType

mySlotsToSkip = new Int[1]  ;change the number based on how many total entries you need
mySlotsToSkip[0] = 34  ;define each entry in your new array as desired starting with index 0

Then when you use UnequipAllOfType pass your array into the aiSlotsToSkip parameter.

 

Please note that I have not had need to utilize UnequipAllOfType so I cannot speak to effectiveness or optimization. However, I am confident that the approach will get the intended data type for the aforementioned parameter.

Link to comment
Share on other sites

aiSlotsToSkip is an integer array. It is therefore expecting an integer array as input into that parameter. You need to create one.

 

This goes in the empty state to declare your new array

Int[] mySlotsToSkip

This goes inside of a function or event that will run prior to your usage of UnequipAllOfType

mySlotsToSkip = new Int[1]  ;change the number based on how many total entries you need
mySlotsToSkip[0] = 34  ;define each entry in your new array as desired starting with index 0

Then when you use UnequipAllOfType pass your array into the aiSlotsToSkip parameter.

 

Please note that I have not had need to utilize UnequipAllOfType so I cannot speak to effectiveness or optimization. However, I am confident that the approach will get the intended data type for the aforementioned parameter.

thank you very much, It do work now.

Link to comment
Share on other sites

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...