Jump to content

[LE] I'd like to instantly converting objects into others using a variable


Recommended Posts

Hello everybody!

 

I would like to instantly convert some objects into others, for example to turn all the iron ore into iron ingots at once preferably through spells like I do with some of my mods in Oblivion.

 

Unfortunately Papyrus scripting seems much more complicated than scripting in Oblivion.

 

Can anyone among you show me an example script so I can easily create mine?

 

I would be very grateful.

Link to comment
Share on other sites

You basically would use RemoveItem() and AddItem()

 

If I had a full example laying around id happily share, or if I had some downtime at work would write an example up etc. Thankfully for you this is def an easy one to do. You shouldnt hesitate to peek at some existing scripts in the game and copy one to adapt for your use

 

I'll peek later if you dont have any bites. Good luck

Link to comment
Share on other sites

An example would be the transmute spell that changes iron into silver and silver into gold.

 

  Reveal hidden contents

Link to comment
Share on other sites

Doesn't mean you cannot adapt the base code into one that converts X amount.

 

Change the condition check to ensure the player has the correct amount (i.e. instead of >= 1 use >= 100 or something like that). Then adjust the amount removed and added accordingly.

 

If you are wanting something that is dynamic and will convert everything that the player might have on hand, that would be possible too. Just store the amount that the player has in a local variable rather than using it as a condition check and use that variable in the remove and add portions.

Link to comment
Share on other sites

Both examples are for use on a magic effect much like the transmute spell script. Please note that neither example has actually been tested for compilation or proper function.

 

For one that requires a specific amount and converts on a one to one basis:

 

  Reveal hidden contents

 

 

For one that will convert whatever amount the player has on a one to one basis:

 

  Reveal hidden contents

 

Link to comment
Share on other sites

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...