DNATraces
The DNATraces API is used to manage DNA traces on different objects. It can be applied to any object with an Extras field, such as props, participant, items, and others.
HasDNATraces
Section titled “HasDNATraces”export type HasDNATraces = { Extras: { DNATraces: {DNATrace}?, [any]: never, },}DNATrace
Section titled “DNATrace”export type DNATrace = { Object: Instance, Target: string, ExpiresAt: number?, Icon: Content,}Functions
Section titled “Functions”Adds a DNA trace to an object.
Parameters
Section titled “Parameters”| Name | Type | Default | Description |
|---|---|---|---|
| object | HasDNATraces | The object. | |
| target | Participant | The participant associated with the trace. | |
| duration | number? | The time until the DNA trace decays. | |
| icon | Content | The icon to show. | |
| instance | Instance | The instance associated with the object. |
Remove
Section titled “Remove”Removes all DNA traces from the specified object.
Parameters
Section titled “Parameters”| Name | Type | Default | Description |
|---|---|---|---|
| object | HasDNATraces | The object. |
Returns the list of DNA traces on the object.
Parameters
Section titled “Parameters”| Name | Type | Default | Description |
|---|---|---|---|
| object | HasDNATraces | The object. |
Returns
Section titled “Returns”{DNATrace}
HasEquivalentTrace
Section titled “HasEquivalentTrace”Returns true if the specified list of traces has an equivalent trace (same object and target).
Parameters
Section titled “Parameters”| Name | Type | Default | Description |
|---|---|---|---|
| traces | {DNATrace} | The traces to check. | |
| trace | DNATrace | The trace. |
Returns
Section titled “Returns”boolean