Question about properties

(Been a while since I was asking questions here)

So I have a question about properties, specifically dealing with factory.create. When I set a game objects properties by giving it a table using factory.create can I later access those properties via a script on said gameobject? For example, lets say I have a Manager script and I make a enemy using factory.create(). When I give it properties via Manager, can a script on the enemy access those properties? Or do I have to send the table through msg.post in order to get them?

1 Like

Properties defined with go.property(“propertyname”, 1234) are accessed from the same script using self.propertyname. You can also access the properties from anywhere using go.get(“propertyname”, “url|id”).

1 Like