Jump to content

Need help with a script; deals with armor


Durai

Recommended Posts

Scriptname AmuletoftheBeast extends ObjectReference

 

Event OnEquipped(Actor akActor)

 

If akActor == Game.GetPlayer()

Game.GetPlayer().SetAR(800)

EndIf

 

EndEvent

 

Event OnUnequipped(Actor akActor)

 

If akActor == Game.GetPlayer()

Game.GetPlayer().SetAR(-800)

EndIf

 

EndEvent

 

Basically I'm trying to make a script for a necklace so that when you are in Vampire Lord form you have a high enough AR to deal with enemies swarming you. The thing is it states "SetAR is not a function or does not exist." Any help is appreciated!

Edited by Durai
Link to comment
Share on other sites

Actually I just read something that I hadn't noticed before: the SetAR function is part of SKSE, which is part of the reason the CK didn't recognize it as a function. Does this mean that without the SKSE there is not way for papyrus to set the armor rating? Edited by Durai
Link to comment
Share on other sites

You could use the function ModActorValue() instead. It's also possible to increase the armor rating by using the actor value DamageResist.

 

 

Scriptname AmuletoftheBeast extends ObjectReference


Event OnEquipped(Actor akActor)
	if (akActor == Game.GetPlayer())
		Game.GetPlayer().ModActorValue("DamageResist", 800)
	endif
EndEvent

Event OnUnequipped(Actor akActor)
	if (akActor == Game.GetPlayer())
		Game.GetPlayer().ModActorValue("DamageResist", -800)
	endif
EndEvent

Link to comment
Share on other sites

Hey thanks for your help Ghaunadaur, it's been immensely helpful.

 

Unfortunately I just found something out: unlike the Ring of the Erudite/Beast, custom rings won't allow the Vampire Lord form to benefit from them. I don't know how Bethesda did it (I've been searching through all the files in the Creation Kit) and I can't seem to find anything that would let the V-Lord use the bonuses from the Vampire rings/amulets. I think they coded something into the actual race, but I can't be sure. Hopefully someone will discover how to keep the bonuses when transforming into the V-Lords soon. Thanks again.

Link to comment
Share on other sites

  • Recently Browsing   0 members

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