Jump to content

Script Assistance - Get Ammo List For Active Weapon


ThatOtherUser

Recommended Posts

Like this:

If rReference.GetIsFormType AMMO
    ;reference is ammunition
ElseIf rReference.GetIsFormType FLST
    ;reference is a formlist
EndIf

But after looking further into the function, I believe it can only be called on a placed reference of a base object (not the same as a reference variable,) since there is no parameter for specifying an object. The same is actually true for GetIsObjectType.

 

GetWeaponAmmo returns a base object (you cannot make references of formlists at all,) I believe you must use NVSE's GetType on this one, like so:

Set rBaseObject to rActor.GetWeaponAmmo
If GetType rBaseObject == 41
    ;object is ammunition
ElseIf GetType rBaseObject == 85
    ;object is a formlist
EndIf
Link to comment
Share on other sites

  • Recently Browsing   0 members

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