The '''GrabInstancer''' component spawns a new copy of <code>Template</code> and attaches it to the user's hand whenever the slot it is attached to is grabbed.
The '''GrabInstancer''' component spawns a new copy of <code>Template</code> and attaches it to the user's hand whenever the slot it is attached to is grabbed.
== Usage ==
== Fields ==
{{Table ComponentFields
{{Table ComponentFields
|Template|Slot| The slot that gets duplicated and grabbed when the GrabInstancer is grabbed.
|Template|Slot| The slot that gets duplicated and grabbed when the GrabInstancer is grabbed. (Like a figurine)
|ContainerTemplate|Slot| Helps let you compose the duplicate
|ContainerTemplate|Slot| The slot to duplicate and act as a container for the grabbed object (Like a box for a figurine)
|ContainerTemplateInstanceRoot|Slot| Helps let you compose the duplicate
|ContainerTemplateInstanceRoot|Slot| The override on where to place the duplicated grabbed object (Where to put the figurine in the box hiearchy).
|ActivateRoot|Bool| Whether or not the GrabInstancer should activate the newly duplicated slot.
|ActivateRoot|Bool| Whether or not the GrabInstancer should activate the newly duplicated slot.
|EnableGrabbable|Bool| Whether or not the GrabInstancer should activate any Grabbable component on the newly duplicated slot.
|EnableGrabbable|Bool| Whether or not the GrabInstancer should activate any Grabbable component on the newly duplicated slot.
|SetInstancePersistent|'''[[Type:Nullable`1|Nullable`1]]<[[Type:Bool|Bool]]>'''|TypeAdv5=true| Whether to set the duplicated object's persistence field, and what to set it to.
|ExcludedParts|{{RootFieldType|SyncRefList`1|[[Type:Slot|Slot]]}}| slots will be skipped while duplicating
|ExcludedParts|{{RootFieldType|SyncRefList`1|[[Type:Slot|Slot]]}}|TypeAdv6=true| slots will be skipped while duplicating
|Physical|Bool| If true, the GrabInstancer only reacts to physical grab.
|Physical|Bool| If true, the GrabInstancer only reacts to physical grab.
|GrabPriority|Int| {{Template:Grab Priority}}
|GrabPriority|Int| {{Template:Grab Priority}}
}}
}}
== Behavior ==
== Usage ==
Attach to a slot and provide a value for <code>Template</code> at minimum.
== Examples ==
== Examples ==
* [https://www.youtube.com/watch?v=QFWU2dZTDvw GrabInstancer] by [[User:ProbablePrime|ProbablePrime]]
A video tutorial about the GrabInstancer by [[User:ProbablePrime|ProbablePrime]]:
<youtube>QFWU2dZTDvw</youtube>
== See Also ==
* [[Component:UIGrabInstancer|UIGrabInstancer]] is similar to this component but uses [[UIX]] elements to do this.
Determines what gets grabbed if several grabbable objects are touching someone's grab sphere. The IGrabbable with the highest priority will be grabbed first. If the highest priority ties with another IGrabbable, it will grab both of those and ignore any lower priority IGrabbables.
Usage
Attach to a slot and provide a value for Template at minimum.
Examples
A video tutorial about the GrabInstancer by ProbablePrime: