#Best way to add health to replicated objects

1 messages · Page 1 of 1 (latest)

undone portal
#

My idea is to just use tags idk what else I can do 🤷‍♂️ objects are constantly gonna be removed so it’s not reasonable to use lists and they need to be synced

dim echo
# undone portal My idea is to just use tags idk what else I can do 🤷‍♂️ objects are constantly ...

U can have a health variable within each replicated object (when u need to set the value of an object’s variable, send an event containing the specified object, and when the event is received, check if Self is equal to the specified object. If it is, set the value of the variable. If you need to get the value of an object’s variable, send an event containing the specified object, and when the event is received, check if Self is equal to the specified object. If it is, send another event containing the value of the variable, and if you want, u can include the specified object too). I wouldn’t suggest this, as it means that extra chips are spawned with each replicated object spawned.

I would suggest using lists. You can send an event to everyone before a replicated object is returned, and include the replicated object in the event. When the other players receive the event, have them remove the object from the object list and remove the corresponding value from the health list. When a player changes the health of an object, have them send an event containing the specified object and the amount they changed the health by.

undone portal
dim echo
undone portal
#

Is that how it works?

#

It can have a different value if it’s replicated?

dim echo
#

If not then it’s prolly a bug

#

Another reason to use lists

lavish halo