Jump to content

Quick Question about Scrolls


paladicprince

Recommended Posts

So how can I determine if a players currently equipped spell is from a scroll?

 

I'm casting spells from an activator under certain conditions, but I'm still reducing magicka appropriately. I want it to be just as if you had cast the spell yourself. So if it's cast from a scroll I want to remove the scroll from inventory after the spell is cast.

 

Any ideas how to accomplish this?

Link to comment
Share on other sites

If anyone has any ideas let me know. I tried this, but it didn't work (I just got the fail message repeatedly).

 

If (Check)
Let InventoryPosition := Player.GetNumItems

While(InventoryPosition >= 0)
	Let TempScrollCheck := InventoryPosition
	Print $InventoryPosition

	If (GetPlayerSpell == GetEnchantment TempScrollCheck)
		Message "Hello"
		Let TempScrollCheck := TempScrollCheck.GetBaseObject
		Player.RemoveItem TempScrollCheck 1
		Let Check := 0
		Break
	EndIf

	Let InventoryPosition -= 1
Loop

Let Check := 0
Message "Fail"
EndIf

Link to comment
Share on other sites

  • Recently Browsing   0 members

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