I have a question about select game object (SOLVED)

Hi, I have a question about how to select a game object with its ID

Something like: local d = go.get("#") > But I want it returns an object, not a property
To using its properties like:
d.health = …
or d.stamina

Thanks

Maybe you can use:
go.property("health", 5)

go.set("another_go#script", "health", 10)
self.health = 20
go.set("#", "health", 20)
2 Likes

Thank you Gregor but is there another way ?

I you have properties defined on a game object using go.property() then you access them “from the outside” using go.get()

2 Likes

Thank you britzl. I got it.