Difference between revisions of "StoreInWorkshop - ObjectReference"

From the Fallout4 CreationKit Wiki
Jump to navigation Jump to search
imported>Plplecuyer
 
imported>Illyism
Line 26: Line 26:
== Notes ==
== Notes ==
If the base object is not buildable by the player because the player doesn't meet the recipe's conditions, this function won't force it to show in the build menu. It will show up once the player passes the conditions.
If the base object is not buildable by the player because the player doesn't meet the recipe's conditions, this function won't force it to show in the build menu. It will show up once the player passes the conditions.
This will not trigger [[OnWorkshopObjectDestroyed - ObjectReference|OnWorkshopObjectDestroyed]] for scripted object cleanup.


== See Also ==
== See Also ==
*[[ObjectReference Script]]
*[[ObjectReference Script]]

Revision as of 20:40, 6 March 2020

Member of: ObjectReference Script

If the reference is a Workshop, stores the given object with an optional count.

Syntax

Function StoreInWorkshop(Form akBaseItem, int aiCount = 1) native

Parameters

  • akBaseItem: The base object of the item to store.
  • aiCount: How many of the base object to store. (Must be at least 1)
    • Default: 1

Return Value

None.

Examples

; Store 10 widgets in our Workshop
MyWorkshop.StoreInWorkshop( WidgetForm, 10 )

Notes

If the base object is not buildable by the player because the player doesn't meet the recipe's conditions, this function won't force it to show in the build menu. It will show up once the player passes the conditions.

This will not trigger OnWorkshopObjectDestroyed for scripted object cleanup.

See Also