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?