Dyramisty Posted January 30, 2013 Share Posted January 30, 2013 Hey guys. How would one go about writing a script that forces the alchemy menu to open on a spell effect?Hope someone is able to give me a heads up! Link to comment Share on other sites More sharing options...
kromey Posted January 31, 2013 Share Posted January 31, 2013 I think the standard solution is to create an invisible alchemy table in front of the player, activate it, and then when the player closes the alchemy menu delete the table. I would suggest checking out Chesko's mod Frostfall, specifically the mortar and pestle, an item you can carry in your inventory and perform alchemy in the field -- it's not a spell, but you should easily be able to duplicate his script's procedure in a spell. Link to comment Share on other sites More sharing options...
Dyramisty Posted January 31, 2013 Author Share Posted January 31, 2013 (edited) . Edited January 31, 2013 by Dyramisty Link to comment Share on other sites More sharing options...
Dyramisty Posted January 31, 2013 Author Share Posted January 31, 2013 I think the standard solution is to create an invisible alchemy table in front of the player, activate it, and then when the player closes the alchemy menu delete the table. I would suggest checking out Chesko's mod Frostfall, specifically the mortar and pestle, an item you can carry in your inventory and perform alchemy in the field -- it's not a spell, but you should easily be able to duplicate his script's procedure in a spell. I've checked his work out, true it's similar, yet my Papyrus skills are by far from what they should be to understand everything in there. Would be great if someone could help me out. Link to comment Share on other sites More sharing options...
TripleSixes Posted January 31, 2013 Share Posted January 31, 2013 (edited) What you will do in the CK is duplicate the alchemy table, make a new cell. Place your duplicate in said cell. The cell can be empty, just place a floor piece, and the workbench on it. When you cast the spell with the script attached, you will go into the crafting menu from where you are standing In your script, define a object reference property as your work bench. Make a OnEffectStart() event block, and use the .activate() function. I'm not sure if you will need to disable the player's controls and re-enable them when you exit, but you shouldn't have to. Have you scripted before? Edited January 31, 2013 by TripleSixes Link to comment Share on other sites More sharing options...
Dyramisty Posted January 31, 2013 Author Share Posted January 31, 2013 What you will do in the CK is duplicate the alchemy table, make a new cell. Place your duplicate in said cell. The cell can be empty, just place a floor piece, and the workbench on it. When you cast the spell with the script attached, you will go into the crafting menu from where you are standing In your script, define a object reference property as your work bench. Make a OnEffectStart() event block, and use the .activate() function. I'm not sure if you will need to disable the player's controls and re-enable them when you exit, but you shouldn't have to. Have you scripted before? I have played around with Papyrus, but never scripted form scratch.The only scripting knowledge I have is web-based.An example would help me out tremendously as I think the script itself wouldn't be too big. Thanks for the help. Link to comment Share on other sites More sharing options...
Dyramisty Posted January 31, 2013 Author Share Posted January 31, 2013 What you will do in the CK is duplicate the alchemy table, make a new cell. Place your duplicate in said cell. The cell can be empty, just place a floor piece, and the workbench on it. When you cast the spell with the script attached, you will go into the crafting menu from where you are standing In your script, define a object reference property as your work bench. Make a OnEffectStart() event block, and use the .activate() function. I'm not sure if you will need to disable the player's controls and re-enable them when you exit, but you shouldn't have to. Have you scripted before? Would something like this work?Scriptname XYZDyramistyMysteriousSpellActivationScript extends ActiveMagicEffect ObjectReference Property CertainObject auto Event OnEffectStart(Actor akTarget, Actor akCaster) CertainObject.Activate(Self) EndEvent Link to comment Share on other sites More sharing options...
SSSl4Yer Posted February 1, 2013 Share Posted February 1, 2013 Will work, though you should change this line: CertainObject.Activate(Self)to CertainObject.Activate(akCaster) Link to comment Share on other sites More sharing options...
Recommended Posts