Get msg.url of a GO (not a component) within a collection created by a factory (SOLVED)

  • I use a collection factory to create isabel
  • Isabel has a parentGO with various other GOs inside, one for each sprite (legs, arms, face, body)

I want to use a script inside the parentGO to animates various aspects of the childGOs, but I can’t figure out how to get the address.

Blockquote
local my_url = msg.url(".")
print(“here comes some url stuff!”)
print(my_url) --> url: [default:/collection26/isabel]
print(my_url.socket) --> hash: [default]
print(my_url.path) --> hash: [/collection26/isabel]
my_url.path = “/legl”
my_url.fragment = nil
print(my_url.fragment) --> nil
print(my_url) --> url: [default:/legl]
print(“end of url stuff!”)

The problem is that the collection26 changes sometimes.

21

oh godddddd i just realised the problem is that i was writing “/legl” instead of “legl”.

problem solved…