Strange Wieldable Lantern Script Problem

Post » Mon Jun 18, 2012 10:21 pm

Ok, so I been working on my mod 'Wieldable Lantern", I have a few strange problems. I have currently 3 different lanterns that can be crafted. Since they are torch items I cannot craft them directly, I have to craft dummies, and when they are added to the players inventory they are swapped out for the real item.

What I want it to do:
When the Armor property items are crafted, swap them out for the appropriate Light property item.

What it is doing instead:
LanternDummy and LanternLousyDummy are swapped out properly each time.
HOWEVER, LanternGoldenPurpleDummy is not swapped out the first time it is crafted, but every time after that.

Scriptname WieldableLanternDummySwap extends ObjectReferenceFormList Property WieldableLanternListDummy  AutoArmor Property LanternLousyDummy  AutoArmor Property LanternDummy  AutoArmor Property LanternGoldenPurpleDummy  AutoLight Property WieldableLanternLight  AutoLight Property WieldableLanternLousyLight  AutoLight Property WieldableLanternGoldenPurpleLight  AutoEvent OnItemAdded(Form akBaseItem, int aiItemCount, ObjectReference akItemReference, ObjectReference akSourceContainer)		 AddInventoryEventFilter(WieldableLanternListDummy)		 If(akBaseItem == LanternGoldenPurpleDummy)				  Game.GetPlayer().RemoveItem(akBaseItem)				  Game.GetPlayer().AddItem(WieldableLanternGoldenPurpleLight, 1 )				  Debug.MessageBox("thing added")		 elseif(akBaseItem == LanternDummy)				  Game.GetPlayer().RemoveItem(akBaseItem)				  Game.GetPlayer().AddItem(WieldableLanternLight, 1 )				  Debug.MessageBox("thing removed2")		 elseif(akBaseItem == LanternLousyDummy)				  Game.GetPlayer().RemoveItem(akBaseItem)				  Game.GetPlayer().AddItem(WieldableLanternLousyLight, 1 )				  Debug.MessageBox("thing removed")		 endifendEvent

The other strange problem that happens is one of the lantern's 3D model preview, seemingly random, that displays in the craft menu and in the players inventory will appear zoomed in greatly, covering most of the player's screen, yet they are all set up exactly the same and use the same model.
User avatar
Carlos Vazquez
 
Posts: 3407
Joined: Sat Aug 25, 2007 10:19 am

Return to V - Skyrim