Background for Fallout 4
Member of the ObjectReference script
ObjectReference[]functionGetWorkshopResourceObjects(ActorValueakAV=NONE, intaiOption=0)Native

Description

Wiki Description

Finds all ObjectReference that are linked to the given Workshop reference that produce resources. Optionally, you can get a list of references that produce only a given resource. You can also optionally specify finding either objects with damaged resources, or objects with undamaged resources.

Documentation Comment

Get all of the resource-producing objects owned by this Workbench. If akAV is provided,
only collect objects producing the corresponding resource. If aiOption is provided, use 0 for all nonzero resources, 1 for only damaged resources, 2 for only undamaged resources.


Parameters

  1. ActorValueakAV=NONE

    CK Wiki Description

    If specified, a Resource-type Actor Value. Only linked references producing this resource will be added to the array. If None, all Resource-type actor values will be checked.

    • Default:None
  2. intaiOption=0

    CK Wiki Description

    0 for all resource-producing items, 1 for only damaged resource-producing items, 2 for only undamaged resource-producing items.

    • Default:0 (all resource-producing items)

Examples

; Find all Food producers in the SanctuaryWorkshopRef workshop.
ObjectReference[] foodProducers = SanctuaryWorkshopRef.GetWorkshopResourceObjects(Food)
; Find all producers of all resources in the SanctuaryWorkshopRef workshop.
ObjectReference[] resourceProducers = SanctuaryWorkshopRef.GetWorkshopResourceObjects()
; Find all undamaged producers of Food in the SanctuaryWorkshopRef workshop.
ObjectReference[] resourceProducers = SanctuaryWorkshopRef.GetWorkshopResourceObjects(Food, 2)
; Find all damaged producers of any resource in the SanctuaryWorkshopRef workshop.
ObjectReference[] resourceProducers = SanctuaryWorkshopRef.GetWorkshopResourceObjects(aiOption=1)

Auto-Generated Example

ActorValue myActorValue__akAV
int myInt__aiOption

ObjectReference[] returnedValue = myObjectReference__toCallFunctionOn.GetWorkshopResourceObjects(myActorValue__akAV, myInt__aiOption)

Related Pages


Additional References

View this function’s page on the Fallout 4 Creation Kit Wiki

Some data provided by the Fallout 4 Creation Kit Wiki. Licensed under the Creative Commons Attribution-Share Alike 4.0 license.