Jump to content

[LE] Need help with scripting - IsEquipped function


Recommended Posts

So when I scripts, I figured that if I use IsEquipped function to detect whether or not an actor equipped ammo, I got a QTD when I load my game. Can anyone help me?

This is the code:

 

	if (!GetCasterActor().IsEquipped(ArrowFormList) && GetCasterActor().GetEquippedItemType(0) == 7)
		GetCasterActor().equipItem(boundArrow, TRUE, TRUE)
	endif

Thank you all for clicking this topic.

Edited by dider103
Link to comment
Share on other sites

I don't think you can use a formlist with isEquipped?

Yes you can :smile:

 

 

So when I scripts, I figured that if I use IsEquipped function to detect whether or not an actor equipped ammo, I got a QTD when I load my game. Can anyone help me?

This is the code:

 

 

 

	if (!GetCasterActor().IsEquipped(ArrowFormList) && GetCasterActor().GetEquippedItemType(0) == 7)
		GetCasterActor().equipItem(boundArrow, TRUE, TRUE)
	endif
Thank you all for clicking this topic.

 

Have you checked the papyrus log for any errors? It may help to narrow down the issue. Maybe also add some debugging lines to your script to check if some variables or properties aren't filled correctly.

Edited by Ghaunadaur
Link to comment
Share on other sites

  • Recently Browsing   0 members

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