Jump to content

DOWNLOAD MODS

Are you looking for something shiny for your load order? We have many exclusive mods and resources you won't find anywhere else. Start your search now...

LEARN MODDING

Ready to try your hand at making your own mod creations? Visit the Enclave, the original ES/FO modding school, and learn the tricks of the trade from veteran modders...

JOIN THE ALLIANCE

Membership is free and registering unlocks image galleries, project hosting, live chat, unlimited downloads, & more...

Scripting Help: Getting Item to Remove Itself


feanor3791
 Share

Recommended Posts

Hi all;

I need the assistance of one of you scripting gurus. I've created a Welkynd Stone that can be used to enchant, following the example of the Varla Enchanting mod. I created a script that adds the special Welkynd to inventory when a normal one is picked up, and removes a normal one from the inventory. But it only works if the player already has another normal Welkynd in inventory: otherwise, the game freezes or crashes. I've tried using RemoveMe, getting an item count to make sure one's in inventory before removing, and various other things, all with either the same result or just not removing the stone at all.

So how exactly do you get an item to remove itself from inventory?

Thanks in advance.

Feanor

Link to comment
Share on other sites

You should get the desired result if you attach this script to the WelkyndStone Misc. item in the CS:

scn FearorWelkyndStoneAddScript


Begin OnActivate Player


Player.addItem FeanorWelkyndStone 1

Disable


End

^That should disable the vanilla welkynd stone while adding yours to the Player at the same time.

Note: This won't affect welkynd stones found in random loot.

Link to comment
Share on other sites

You should get the desired result if you attach this script to the WelkyndStone Misc. item in the CS:

scn FearorWelkyndStoneAddScript


Begin OnActivate Player


Player.addItem FeanorWelkyndStone 1

Disable


End

^That should disable the vanilla welkynd stone while adding yours to the Player at the same time.

Note: This won't affect welkynd stones found in random loot.

Thanks, buddy; going to try this right now. Would've replied sooner, but my computer crashed a few days ago and I just got it up again. Burned out my video card playing Oblivion. :P

Link to comment
Share on other sites

Thanks, buddy; going to try this right now. Would've replied sooner, but my computer crashed a few days ago and I just got it up again. Burned out my video card playing Oblivion. :P

Lol, I did the same thing not two weeks ago. My old NVidia 9800 decided it just couldn't handle Oblivion any more and committed sudoku. Uh, I mean, seppuku. :P

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

×
×
  • Create New...