Hello.
Coming from Unity, i like DEFOLD very much ! Because its lean, super fast, easy to use, no struggle by exporting / publishing to different systems ! (Allways a nightmare with other gameEngines). Anyways, back to topic: “easy to use”:
I am a real beginner here. Just want to learn the basics. I have a simple scene, the starter Scene with the Defold-Logo. In my main.collection i have on top of the hiearchy a “go”-element. Inside this “go” there is “background” & “logo” element. So i just want to access these child-elements by iD or URL. I have to say, i don´t know whats the difference with these two. So i try to access them by this code:
go.animate("#logo", “position.y”, go.PLAYBACK_LOOP_PINGPONG, pos.y + 300, go.EASING_INOUTSINE, 3)
But it doesn´t work ! If i change the code, especially in the brackets “#logo” to “.” it works, but it moves the whole “go”-element with their child elements. How can i move just the “logo” sprite, instead the whole “go”-element ?
This also don´t work:
go.set_position("#logo", “position.x”, 222)
But this works again:
msg.post("#logo", “disable”)
I am a bit irritated. I didn´t found any tutorials / explainations about how to access child-elements inside a “go”-parent element. Would be great if someone can give me a hint, a link, or a solution to my prob. Thx.