- Found in:
- Workshop Framework
Description
Documentation Comment
Creates a settlement object as if the player built it in workshop mode, and returns the reference, or None if it failed.
Parameters:
PlaceMe - Your objects should be in an array of structs per the WorldObject definition found in Library:DataStructures.
akWorkshopRef [Optional] - The objectreference of the settlement workbench cast as WorkshopScript. If this is not sent, the object will not be linked to the workshop. The Link is what allows several gameplay elements: Player Scrapping, Crafting Stations to share resources, Assignable objects to be assignable, and more.
akPositionRelativeTo [Optional] - It the positions in your PlaceMe data are offsets from a specific reference, send that reference (note that this increases the processing time by about 40%, so sending world coordinates is definitely preferred)
abStartEnabled [Optional] - If you would like to handle enabling the objects yourself, set this to false
Parameters
<UNKNOWN_SCRIPT: WorldObject>PlaceMe
<UNKNOWN_SCRIPT: WorkshopScript>akWorkshopRef=NONE
ObjectReferenceakPositionRelativeTo=NONE
boolabStartEnabled=true
Examples
Auto-Generated Example
WorldObject myWorldObject__PlaceMe
WorkshopScript myWorkshopScript__akWorkshopRef
ObjectReference myObjectReference__akPositionRelativeTo
bool myBool__abStartEnabled
ObjectReference returnedValue = WorkshopFramework:WSFW_API.CreateSettlementObject(myWorldObject__PlaceMe, myWorkshopScript__akWorkshopRef, myObjectReference__akPositionRelativeTo, myBool__abStartEnabled)