Jump to content

Skyrim Script Help


Iconic985

Recommended Posts

Hey guys,

 

Basically I'm looking for a script I can attach to a piece of armor so that when it is equipped it opens up the alchemy menu, then unequipped the same piece of armor. Another cool thing (though no necessary) would be if it also placed an idle marker at them player and forces the to use it. I've tried lots of things and so far none have worked. I am also pretty hopeless at scripting.

 

Thank you for your time. :biggrin:

Link to comment
Share on other sites

Essentially what I want is for people to be able to make potions anywhere in the world. The way they would do this is by clicking on a certain item in their inventory. I have created an item called "Alchemists Field Alembic" and basically what I want is that once the item has been clicked, the inventory menu exits, and the alchemy menu opens up. I hope this helps answer your question.

Link to comment
Share on other sites

Yes it does.

 

I think I've an idea for you. But it is one that needs testing before I can feel safe giving it to you.

 

Edit...

My idea works. Couldn't really test as my graphics went out and the laptop I'm forced to use falls outside of Skyrim's minimum specs. It will load but it is super slow on even the lowest of settings.

 

Anyway, what you need to do is the following...

 

1. Create an interior cell

2. Place a alchemy station

3. Edit that reference and give it a specific name

4. Edit the item that will activate the alchemy menu. Does not need to be armor. I used a miscobject (a coin) to test with.

5. Go to the script section, press add, select [New Script] in the window that pops up

6. Give your script a name in the next pop up and ensure that it extends ObjectReference

7. Right click on the script name in the script section of the item and select Edit Script

8. Copy & paste the following below the line that states your script name.

 

 

ObjectReference Property YourAlchemyStationReferenceNameHere Auto
Actor Property PlayerRef Auto

Event OnEquipped(Actor Someone)
	If Someone == PlayerRef
		Game.DisablePlayerControls(False, False, False, False, False, True) ; Exit menu
		Utility.Wait(0.01)
		YourAlchemyStationReferenceNameHere.Activate(Someone)
		Utility.Wait(0.01) 
		Game.EnablePlayerControls(False, False, False, False, False, True) ; Reenable menu
	EndIf
EndEvent

Be sure to make the following changes for easiest usage

-- Change the two instances of YourAlchemyStationReferenceNameHere to the exact name you gave your alchemy station reference

 

 

9. Compile the script, save and exit the script window

10. Highlight the script in the script section, press the Properties button

11. Press the Auto-Fill All button at the bottom left.

-- Both properties should fill if your reference name matches the name used in the script.

-- If not, you'll need to manually add the reference by editing, selecting the cell in the drop down list, selecting the station in the next drop down list, or by pressing the button to select it from the render window.

Edited by IsharaMeradin
Link to comment
Share on other sites

If the auto-fill button is grey'd out then you did not include the property declaration lines and the script should not have compiled.

 

Your script text should look similar to this, the working version that I used.

 

 

Scriptname abimRemoteAlchemyAccess extends ObjectReference

ObjectReference Property abimRemoteAlchemyActivatorREF Auto
Actor Property PlayerRef Auto

Event OnEquipped(Actor Someone)
	If Someone == PlayerRef
		Game.DisablePlayerControls(False, False, False, False, False, True) ; Exit menu
		Utility.Wait(0.01)
		abimRemoteAlchemyActivatorREF.Activate(Someone)
		Utility.Wait(0.01) 
		Game.EnablePlayerControls(False, False, False, False, False, True) ; Reenable menu
	EndIf
EndEvent
 

 

 

Link to comment
Share on other sites

It works. Sort of.

When I use it it teleports me to the empty cell with the alchemy bench and when I exit I fall into the void. I want to be able to open the alchemy menu without teleporting or an alchemy table been visible.

Edited by Iconic985
Link to comment
Share on other sites

It works. Sort of.

When I use it it teleports me to the empty cell with the alchemy bench and when I exit I fall into the void. I want to be able to open the alchemy menu without teleporting or an alchemy table been visible.

That is interesting. I tested it with a modified alchemy bench that did not have many keywords and with a normal alchemy bench that had all the keywords. In both cases my character remained exactly where she stood. But then I was using a mod-free save to test with. Could always be a conflict with something. But yes, as TheGreenLion stated seeing the script as you are implementing it would be helpful.

Link to comment
Share on other sites

Ok, here is the script I am Using.

 

Scriptname PortableAlchemy extends ObjectReference

ObjectReference Property AlchPort01 Auto
Actor Property PlayerRef Auto
Event OnEquipped(Actor Someone)
If Someone == PlayerRef
Game.DisablePlayerControls(False, False, False, False, False, True) ; Exit menu
Utility.Wait(0.01)
AlchPort01.Activate(Someone)
Utility.Wait(0.01)
Game.EnablePlayerControls(False, False, False, False, False, True) ; Reenable menu
EndIf
EndEvent

Link to comment
Share on other sites

  • Recently Browsing   0 members

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