#How to allow replicated objects to have their own variables

1 messages · Page 1 of 1 (latest)

lapis prairie
#

Hey! I highly recommend giving your post a name that describes what you’re trying to do so that other people can search and know what this is for.
I’m happy to rename it for you, but first I want to understand what you’re trying to do. Can you clarify your message? I’m not sure what you’re trying to achieve
It sounds like you want every replicated object to have its own variable value, is that right?

ocean steeple
#

yes

#

@lapis prairie

lapis prairie
#

Perfect! All you have to do is put the object variable inside of the object that gets replicated. The circuits get replicated with the object too, and since the variables are inside of an object scope, they won’t interact with each other
Does that make sense?

#

How to allow replicated objects to have their own variables

ocean steeple
#

no not like that

#

wait

#

i'll talk about this later with more understanding

#

sorry

ocean steeple
#

So if I connected the “replicated object” you would see that it worked but i wanted each and every replicated trigger handle to have one value so that when I replicate the container and set position of the first individual trigger handle of its own value because if I replicated another trigger handle when connected the "replicated object" the first container of presses will set position of two replicated trigger handle. @lapis prairie

lapis prairie
#

Ah, I see. Yea so for this one you need to replicate the main trigger handle and the object that you’re teleporting at the same time
I’d recommend using tags to “link” the objects together. Whenever you spawn a new trigger handle, you can count up a synchronized int variable and give both objects the tag of whatever the integer variable is. In the trigger handle, get the tag on the object and use it to find the other object with Rec Room Obect Get Alll With Tag. From there you can use List Except and connect a List Create of 1 element that is just the Self port of the trigger handle so you get the other spawned object (List Except takes two lists and gets rid of elements that are the same in both lists, so you’re jus typing it to get the other tagged object)

ocean steeple
#

Please @lapis prairie