I want to create a speech bubble game object with scriptable behavior as a re-usable prototype which I can embed within other instances. However the text cannot be set for each instance, as setting it for one will change it for all.
Here’s my file structure:
person.go - file with script controller and other components
speech_bubble.go - file with label component and script controller
And in the main collection outline:
- person1 - instance of person.go
– controller - instance property is set here
– speech_bubble1 - embedded instance of speech_bubble.go
---- controller - an instance property is set here
---- label component - person2 - instance of person.go
– controller - instance property is set here to a different value
– speech_bubble1 - embedded instance of speech_bubble.go
---- controller - an instance property is set here to a different value
---- label component
With this structure, I cannot have a unique label for each person. Is this possible? Maybe I misunderstand how defold works. But I would like to use this configuration so that my other non-coding teammembers can create instances of a person with or without a speech bubble.