Jump to content

Photo

Need help with small armor script

script properties

  • Please log in to reply
1 reply to this topic

#1
Hoamaii

Hoamaii

    Resident poster

  • Premium Member
  • 3,225 posts

Hi guys,

 

I feel stupid, I've been trying to write a simple script to get my character to unequip his helmet before he performs some action, but I've been stuck with a dumb question: I can't find the right type of property to attach to generic helmets. Here's how it goes:

keyword property ArmorHelmet auto
armor Helmet


Event OnActivate(ObjectReference akActionRef)

	If Game.GetPlayer().isEquipped(Helmet)
		Game.GetPlayer().UnequipItem(Helmet, false, true)
	EndIf

EndEvent

It compiles but of course it does not work... I get a "none" log error when the script runs. I've also tried using "HasKeyword(ArmorHelmet)" and Formlist property, doesn't work either but I don't get errors.

 

I'm trying not to use skse scripts here, only Vanilla settings. I can get a 200 lines script working fine and cannot get this simple one right - damn frustrating!!!

 

Can any of you point to me what's wrong here?

 

Thanks :)

 

PS. And sorry for the quote up here, I can't remember how to post scripts with all the pretty colors... sigh, bad day...

 

 



#2
Hoamaii

Hoamaii

    Resident poster

  • Premium Member
  • 3,225 posts

Ahem... anybody?







Also tagged with one or more of these keywords: script, properties

IPB skins by Skinbox
Page loaded in: 1.084 seconds