Retrieving property of other game object on collision

I am trying to create a platformer where there are different types of platforms that the main actor(hero) can interact with. I have created then as kinematic objects so I can handle the physics on my own. I need to have a different behaviour depending on the type of platform - for this I am trying to retrieve a property called “type” on the platform object when the collision message is received in the hero script. But I get an error
hero/hero.script:155: ‘(null)’ does not have any property called 'type’
when I try to do the following :
go.get(message.other_id,“type”)
When I write
print(message.other_id)
I get
hash: [/level/150x200_white4]
on the console

How do I retrieve the url of the platform or how I retrieve the value of the property from the platform in the hero object?

The url is received like:

local url=msg.url(nil, message.other_id, “script”)

where “script” is the name of the script component you want to get the property value from later.

1 Like

Thanks! Is there any place where this is documented?

Yes, you can read all about creating urls here: http://www.defold.com/doc/message-passing