How to access table value from another GO?

No, the allowed types for go.property() are number | hash | url | vector3 | vector4 | quaternion. It’s been discussed a bit here: Hash/Array as an editor property?

When it comes to pathfinding I would probably solve this as well through message passing:

  • Player taps on a location on the map to where he wishes the hero to move
  • Some controller script receives the input (in on_input())
  • The controller script makes sure it’s allowed to move the player at this time (no modal dialog, game isn’t paused, it’s the player’s turn etc)
  • The controller script does a msg.post() to the level with a request to find a path to the point where the user tapped
  • The level initiates a path finding algorithm, possibly letting it run over several frames
  • Once a path has been found (or no path is available) the level posts back to the controller script with the path
  • The controller script posts the path to the player script which starts moving the player along the path
3 Likes