Jump to content

help moving vanilla workbench (same cell)


greekrage

Recommended Posts

I need a sure fire way of moving the workshop workbench to a different spot but in the same cell for a location mod.

 

Someone once suggested a script but i didnt see any result... (defaultmovetoeditorlocation ) or i didnt set it up as intended because i simply didnt know how...so i left the properties empty...

 

A little help on this please?

Link to comment
Share on other sites

I would place a workbench in order to find out the proper position/rotation of the destination location, then place an xmarker and copy the position and rotation of the workbench.

Once you have the xMarker correctly positioned you can remove the workbench you used for positioning.

 

Then you need to move the workbench with a script, but you need it to be fully loaded in order to move it, so you can attach a script to the actual workbench and link the workbench to the xMarker with a keyword, for example LinkCustom01:

 

Workbench -----LinkCustom01------->xMarker

 

Then the script attached to the workbench would look like this:

Keyword Property LinkCustom01 Auto

Event OnCellLoad()
	If Is3dLoaded()
		ObjectReference xMarkerRef = GetLinkedRef(LinkCustom01)
		Moveto(xMarkerRef)
	EndIf
EndEvent
Link to comment
Share on other sites

 

I would place a workbench in order to find out the proper position/rotation of the destination location, then place an xmarker and copy the position and rotation of the workbench.

Once you have the xMarker correctly positioned you can remove the workbench you used for positioning.

 

Then you need to move the workbench with a script, but you need it to be fully loaded in order to move it, so you can attach a script to the actual workbench and link the workbench to the xMarker with a keyword, for example LinkCustom01:

 

Workbench -----LinkCustom01------->xMarker

 

Then the script attached to the workbench would look like this:

Keyword Property LinkCustom01 Auto

Event OnCellLoad()
	If Is3dLoaded()
		ObjectReference xMarkerRef = GetLinkedRef(LinkCustom01)
		Moveto(xMarkerRef)
	EndIf
EndEvent

THanks so much...Works like a charm.... and i didnt even have to add a copy bench... Just moved the original and got its x,y,z that i pasted to the Xmarker and it worked fine,...Just one fast travel away and back...and it was in place.

Link to comment
Share on other sites

I'm glad to help. There's still place for improvements in the script, tho. Like checking if the workbench is already moved, or removing the xmarker after moving the workbench, or even getting it moved without a fast travel using the OnInit event, in case it is already loaded when you load the game.

 

EDIT: Actually the OnInit event wouldn't work, because it is received when the object is initialized, and the workbench is already initialized in a saved game. The only solution I can think of right now is a quest script instead, so you can make use of OnQuestInit, but then you need a property for the Worbench reference, and append it to the GetLinkedRef and Move functions.

 

Let me know if you want to try the Quest script path, and I'll bring you more help.

Edited by DieFeM
Link to comment
Share on other sites

  • Recently Browsing   0 members

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