{"action":"created","issue":{"url":"https://api.github.com/repos/GoranM/bdx/issues/120","labels_url":"https://api.github.com/repos/GoranM/bdx/issues/120/labels{/name}","comments_url":"https://api.github.com/repos/GoranM/bdx/issues/120/comments","events_url":"https://api.github.com/repos/GoranM/bdx/issues/120/events","html_url":"https://github.com/GoranM/bdx/issues/120","id":55909887,"number":120,"title":"Need some help with storing variables","user":{"login":"rafcolson","id":10002909,"avatar_url":"https://avatars.githubusercontent.com/u/10002909?v=3","gravatar_id":"","url":"https://api.github.com/users/rafcolson","html_url":"https://github.com/rafcolson","followers_url":"https://api.github.com/users/rafcolson/followers","following_url":"https://api.github.com/users/rafcolson/following{/other_user}","gists_url":"https://api.github.com/users/rafcolson/gists{/gist_id}","starred_url":"https://api.github.com/users/rafcolson/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rafcolson/subscriptions","organizations_url":"https://api.github.com/users/rafcolson/orgs","repos_url":"https://api.github.com/users/rafcolson/repos","events_url":"https://api.github.com/users/rafcolson/events{/privacy}","received_events_url":"https://api.github.com/users/rafcolson/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2015-01-29T15:04:37Z","updated_at":"2015-01-29T19:32:11Z","closed_at":null,"body":"Hi,\r\n\r\nI've been searching for a way to store a value into a variable of GameObject, but nothing helps.\r\n\r\nGameObject.java: ```public String bodyType;```\r\nScene.init(): ```g.bodyType = gobj.get(\"physics\").get(\"body\").asString();```\r\n\r\nI'm always getting ```null```. I tried the same thing with storing ```g.ghost``` but this always returns ```false```.\r\n\r\nI'm confused because when I look at Bullet.makeBody(), there seems to be no problem with getting:\r\n```String body_type = gobj.get(\"physics\").get(\"body\").asString();```\r\n\r\nThanks for your help.\r\n\r\nEdit: Even if I do: ```g.bodyType = \"Hello World\";``` it will return ```null```. It's so strange."},"comment":{"url":"https://api.github.com/repos/GoranM/bdx/issues/comments/72088533","html_url":"https://github.com/GoranM/bdx/issues/120#issuecomment-72088533","issue_url":"https://api.github.com/repos/GoranM/bdx/issues/120","id":72088533,"user":{"login":"GoranM","id":2141814,"avatar_url":"https://avatars.githubusercontent.com/u/2141814?v=3","gravatar_id":"","url":"https://api.github.com/users/GoranM","html_url":"https://github.com/GoranM","followers_url":"https://api.github.com/users/GoranM/followers","following_url":"https://api.github.com/users/GoranM/following{/other_user}","gists_url":"https://api.github.com/users/GoranM/gists{/gist_id}","starred_url":"https://api.github.com/users/GoranM/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/GoranM/subscriptions","organizations_url":"https://api.github.com/users/GoranM/orgs","repos_url":"https://api.github.com/users/GoranM/repos","events_url":"https://api.github.com/users/GoranM/events{/privacy}","received_events_url":"https://api.github.com/users/GoranM/received_events","type":"User","site_admin":false},"created_at":"2015-01-29T19:32:11Z","updated_at":"2015-01-29T19:32:11Z","body":"GameObjects in the scene are just clones of templates that are created in Scene.init. The implementation of that cloning process is defined in cloneNoChildren, which copies the value of relevant fields from template to new instance.\r\n\r\nI assume that you only set the value of ghost for the template object (in Scene.init); you would also need to set it for each instance (in cloneNoChildren) to get the behavior you want."}}