11
« on: March 28, 2014, 04:55:05 pm »
When a scene is created you have no control over the order in which the behaviours are initialised.
Therefore, if you reference an attribute from another behaviour in a behaviour's "when created" part, it might not be initialised, and will return value you don't expect.
So best practice, if you want to grab another behaviours attribute as soon as you can, add in a small delay or do it with a boolean that is true once within an always wrapper.
That is why I think you are seeing random things in your game.
Game attributes should be able to be grabbed straight away as long as you ain't trying to change them in another behaviour.