How to set a property's value

Post » Sun Sep 21, 2014 4:30 pm

I'm trying to write a script that on initiation (it is a spell) equips a helmet onto the player, and then, after a short time, re-equips the helmet the player was wearing before-hand.

I can't figure out how to store the player's equipped helmet in the property so that it can be referenced again so that it can be re-equipped. I've tried using "onobjectequipped" and within that function, setting helmproperty = akBaseObject as Armor (ignoring the issues of other armor slots being equipped for now), but this does not work, the property remains as "NONE" (or so I think). The original helmet is not re-equipped in game.

I've also tried using an armor variable instead, but the issue is the same.

Can this be done?
User avatar
Camden Unglesbee
 
Posts: 3467
Joined: Wed Aug 15, 2007 8:30 am

Post » Sun Sep 21, 2014 7:07 am

Could you show the script? (Post it)

User avatar
josie treuberg
 
Posts: 3572
Joined: Wed Feb 07, 2007 7:56 am

Post » Sun Sep 21, 2014 2:44 pm

Have you tried using http://www.creationkit.com/GetWornForm_-_Actor to obtain the currently worn helmet before you replace it with your new helmet?

User avatar
Princess Johnson
 
Posts: 3435
Joined: Wed Feb 07, 2007 5:44 pm

Post » Sun Sep 21, 2014 7:14 pm


Worked like a charm, thanks you two!
User avatar
Hussnein Amin
 
Posts: 3557
Joined: Sun Aug 05, 2007 2:15 am


Return to V - Skyrim