How can I know if Torch01 is equipped?

Post » Thu Jun 21, 2012 2:48 am

Hello,
I'm trying to make an cube trigger area that if you are inside, your loose health (like the nocturnal quest)

here the code
Scriptname mannySucchiavita extends ObjectReference  Int Property howMany = 1 Auto  Light Property theTorch AutoEvent OnTrigger(ObjectReference akActionRef)    If akActionRef == Game.GetPlayer()    if (Game.GetPlayer().IsEquipped(theTorch))   	 Game.GetPlayer().DamageActorValue("health", howMany)    endIfendIfEndEvent

I guarantee that the event still works because I've inserted a debug.notification before. The matter is the "if (Game.GetPlayer().IsEquipped(theTorch))".
Does not works....
Can you help me?

Thank you.
User avatar
Dawn Porter
 
Posts: 3449
Joined: Sun Jun 18, 2006 11:17 am

Post » Thu Jun 21, 2012 1:56 am

Torches are weird. I don't know why what you have doesn't work, but I think you can use http://www.creationkit.com/GetEquippedItemType_-_Actor on each hand and test if the return value is 11.
User avatar
Roberto Gaeta
 
Posts: 3451
Joined: Tue Nov 06, 2007 2:23 am

Post » Thu Jun 21, 2012 2:47 am

Torches are weird. I don't know why what you have doesn't work, but I think you can use http://www.creationkit.com/GetEquippedItemType_-_Actor on each hand and test if the return value is 11.

Thanks man! It works!
User avatar
Lynne Hinton
 
Posts: 3388
Joined: Wed Nov 15, 2006 4:24 am


Return to V - Skyrim