Odinml Posted February 28, 2013 Share Posted February 28, 2013 first off i am terrible at writing scripts, so i was wondering if someone could write a script for me that is capable of swaping any "Armor" for any "MiscObject" on a container change. for example if the script was to be added to a barrel and that barrel had an iron armor in it, when the player places the "Iron Armor" into his inventory it becomes a "Garnet" Link to comment Share on other sites More sharing options...
Deleted2547005User Posted February 28, 2013 Share Posted February 28, 2013 It is a simple remove item and add item code. When the player picks up the armor, the script will remove the iron armor and add the garnet equivelent. I can write such a script in my sleep... in Fallout. Skyrim, uses an entirely different scripting system and I've never tried to code in Skyrim (don't own it, don't care to own either). But the basic setup is that the script checks for the iron armor in the barrel, and if it's gone, and the player was the one that picked it up, it will remove that armor from the player and add the garnet armor. Link to comment Share on other sites More sharing options...
Odinml Posted March 8, 2013 Author Share Posted March 8, 2013 Anyone. Link to comment Share on other sites More sharing options...
Ghaunadaur Posted March 8, 2013 Share Posted March 8, 2013 Given your example, you want to swap a specific type of armor with a specific type of misc object, a script like this would work: Scriptname SwapItemScript Extends ObjectReference Armor Property AnyArmor Auto MiscObject Property AnyItem Auto Actor Property PlayerRef Auto Event OnItemRemoved(Form akBaseItem, int aiItemCount, ObjectReference akItemReference, ObjectReference akDestContainer) if akBaseItem == AnyArmor && akDestContainer == PlayerRef PlayerRef.RemoveItem(AnyArmor, 1, true) PlayerRef.AddItem(AnyItem, 1) endif EndEvent Script needs to be assigned to the container, then the properties filled with the forms for the armor and miscobject to be swapped. And of course the player ref. Though I'm not sure what you mean by 'swap any armor with any misc object'. If it's meant to swap every type of armor with a random misc item, the script would be a bit more complicated. Link to comment Share on other sites More sharing options...
Recommended Posts