Class
MarkerCurve
Represents a list of strings markers in chronological order.
The MarkerCurve instance lets you place markers as string values at certain times on a timeline. The string at each marker cannot exceed 64 characters and must only contain printable characters.
Properties 1#
Lengthint | Returns the number of markers in the MarkerCurve.ReadSafeReadOnlyNotReplicated |
Length: int#
ReadOnlyNotReplicatedReadSafe
Returns the number of markers in the MarkerCurve.
Methods 4#
| GetMarkerAtIndex | Returns the time and string value of the marker at the provided index. |
| GetMarkers | Returns the time and string value of all markers in the MarkerCurve. |
| InsertMarkerAtTime | Inserts a marker with the provided string value at the provided time. |
| RemoveMarkerAtIndex | Remove several markers in the MarkerCurve starting at the provided index. |
GetMarkerAtIndex(index: int): Dictionary#
Returns the time and string value of the marker at the provided index.
| Name | Type | Default | Description |
|---|---|---|---|
index | int | One-based index of the marker to retrieve, ordered chronologically. Must be within range or the call throws. |
Returns
Dictionary— A table containing the time and value of the marker at the provided index.
GetMarkers(): Array#
Returns the time and string value of all markers in the MarkerCurve.
Returns
Array— An array of tables containing the time and value of all markers in the MarkerCurve.
InsertMarkerAtTime(time: float, marker: string): Array#
Inserts a marker with the provided string value at the provided time. The provided string cannot exceed 64 characters and must only contain printable characters.
| Name | Type | Default | Description |
|---|---|---|---|
time | float | Time at which the marker should be added. | |
marker | string | String value associated with this marker. |
Returns
Array— A table containing a boolean and a number. The boolean istrueif the call adds a new marker andfalseif it modifies an existing marker at the provided time. The number is the index of the added marker.
RemoveMarkerAtIndex(startingIndex: int, count: int = 1): int#
Remove several markers in the MarkerCurve starting at the provided index.
| Name | Type | Default | Description |
|---|---|---|---|
startingIndex | int | Index of the first marker to be removed in the MarkerCurve. | |
count | int | 1 | How many markers to remove starting from the startingIndex. |
Returns
int— How many markers were actually removed (can be less than count if the MarkerCurve was too few markers).
Inherited members#
Inherited from Instance 58
Properties (10)
Archivable, archivable, Capabilities, IsInSandbox, Name, Parent, PredictionMode, RobloxLocked, Sandboxed, UniqueId
Methods (39)
AddTag, children, ClearAllChildren, Clone, clone, Destroy, destroy, FindFirstAncestor, FindFirstAncestorOfClass, FindFirstAncestorWhichIsA, FindFirstChild, findFirstChild, FindFirstChildOfClass, FindFirstChildWhichIsA, FindFirstDescendant, GetActor, GetAttribute, GetAttributeChangedSignal, GetAttributes, GetChildren, getChildren, GetDebugId, GetDescendants, GetFullName, GetStyled, GetStyledPropertyChangedSignal, GetTags, HasTag, IsAncestorOf, IsDescendantOf, isDescendantOf, IsPropertyModified, QueryDescendants, Remove, remove, RemoveTag, ResetPropertyToDefault, SetAttribute, WaitForChild