(DLP) Directly Linked Properties
Hello, fellow Robloxians! I’ve been thinking about an idea for a while now, I call it Directly Linked Properties.
What’s a DLP?
A DLP is/would be a property that is linked to another property of the same type, for example, TextLabelA.Text is linked with TextLabelB.Text, Any change to TextLabelA.Text would replicate to TextLabelB.Text and vice versa.
Why do we need this…?
A: It would be way easier to make cool text effects like this one, without having to make a script to change the text of both.
B: Lets say you have a message on a wall that is cloned in different places, instead of having to do…
for i,v in pairs(workspace.Messages:GetChildren()) do
v.Label.Text = "Server Message!"
end
You could just DLP all of the messages and change one in the script and have it apply to all of them!
C: Lets say you’ve created a intermission system, you have a value in workspace called “Shout”, let’s say you initialize it like this…
workspace.Shout.Changed:Connect(function()
script.Parent.Label.Text = workspace.Shout.Value
end)
Instead of doing that, you could just set DLP to the label.Text inside StarterGui and when its cloned to PlayerGui, it maintains its DLP
Limitations
- You cant link a number and a string, it can only be bool to bool, string to string, number to number, etc.
- It might be a pain to DLP multiple objects
Looks
Here is an idea of what I think it should look like:
When you select a linkable property, a link icon will pop up, once you click it, it’ll have the same effect as when you edit the parent property of an object or select an attachment for a rope constraint.
Bugs we may run into
- When an instance using a DLP is removed, It might go crazy so make sure to add an auto disconnect for that.
Modes
Multi-Mode: Uses a mesh type topology, any change to any object in the DLP group will apply changes to them all
Single-Mode: A one-way connection, if A is changed, B will change, but not vice versa
DLP GroupID
A concept similar to Zindexing or collisionId. Apon clicking the Link button, a drop-down menu will show up with an option to create a new group, or add the current object to an existing one.
Lua Implimentation
script.Parent.Label.Text:LinkProperty(script.Parent.Label2.Text,1)
:LinkProperty(Property, GroupId)
:SetPropertyGroup(GroupId)
I’ll be updating this thread often.