Jump to content

[LE] [Script] Open alchemy/Enchanting menu on custom object


Recommended Posts

I am making custom portable alchemy & enchanting workbench. All done and ready, the only thing left is how to trigger the alchemy & enchanting menu since the objects are not exactly act as furniture but as misc item so it can be drop and taken. Plan is to get them open like opening show race menu that i did on activating a custom object.

Event OnActivate(ObjectReference akActionRef)
	game.ShowRaceMenu()
EndEvent	 

But i can't seem to find specific parameter for alchemy and enchanting menu (or perhaps there isn't one idk) ?

 

The unfinished script for my portable workstation

Scriptname _Anb_PortablwWorkstation extends ObjectReference  

Message Property TehMsg Auto
Int Property Button Auto
Idle property IdleSitCrossLeggedEnter auto
Idle property IdleChairExitStart auto

Event OnLoad()
	BlockActivation(True)
EndEvent

Event OnActivate(ObjectReference akActionRef)
	Debug.sendAnimationEvent(game.getplayer(), "IdleSitCrossLeggedEnter")
	Utility.Wait(3.0)
	bool InMenu = true
	While InMenu
	Button = TehMsg.Show()
		 if Button == 0 ; Take the workstation
			Activate(Game.GetPlayer(), True) 
			Debug.sendAnimationEvent(game.getplayer(), "IdleChairExitStart")
			Utility.Wait(3.0)
			InMenu = False
		Elseif Button == 1 ; Alchemy menu
			;..................
		Elseif Button == 2 ; Enchanting menu
			;..................
		Elseif Button == 3 ; Stand up
			Debug.sendAnimationEvent(game.getplayer(), "IdleChairExitStart")
			InMenu = False
	Endif
EndWhile
EndEvent 

Any help will be appreciated.

Thanks

 

Link to comment
Share on other sites

Create an interior cell, no need to link it to the game world. Place one of each workstation that you want to use. When your custom object is activated, activate the workstation. Because it is in a remote inaccessible cell the menu will open without warping the player to the station in order to play the animation.

 

I do this with the smelter in my Mining for Mages mod:

 

 

Scriptname abim_SmeltOreMEScript extends activemagiceffect  

ObjectReference Property Smelter Auto
Float Property SkillAdvancement = 15.0 Auto

Event OnEffectStart(Actor akTarget, Actor akCaster)
    Game.AdvanceSkill("Alteration",SkillAdvancement)
    Smelter.Activate(Game.GetPlayer())
EndEvent

Link to comment
Share on other sites

 

Create an interior cell, no need to link it to the game world. Place one of each workstation that you want to use. When your custom object is activated, activate the workstation. Because it is in a remote inaccessible cell the menu will open without warping the player to the station in order to play the animation.

 

I do this with the smelter in my Mining for Mages mod:

 

 

Scriptname abim_SmeltOreMEScript extends activemagiceffect  

ObjectReference Property Smelter Auto
Float Property SkillAdvancement = 15.0 Auto

Event OnEffectStart(Actor akTarget, Actor akCaster)
    Game.AdvanceSkill("Alteration",SkillAdvancement)
    Smelter.Activate(Game.GetPlayer())
EndEvent

Thanks IsharaMeradin. It works perfectly.

Link to comment
Share on other sites

  • Recently Browsing   0 members

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