{"action":"created","issue":{"url":"https://api.github.com/repos/uqbar-project/wollok/issues/488","labels_url":"https://api.github.com/repos/uqbar-project/wollok/issues/488/labels{/name}","comments_url":"https://api.github.com/repos/uqbar-project/wollok/issues/488/comments","events_url":"https://api.github.com/repos/uqbar-project/wollok/issues/488/events","html_url":"https://github.com/uqbar-project/wollok/issues/488","id":122142021,"number":488,"title":"Allow a character to say something not necessary triggered by the keyboard","user":{"login":"javierfernandes","id":4428120,"avatar_url":"https://avatars.githubusercontent.com/u/4428120?v=3","gravatar_id":"","url":"https://api.github.com/users/javierfernandes","html_url":"https://github.com/javierfernandes","followers_url":"https://api.github.com/users/javierfernandes/followers","following_url":"https://api.github.com/users/javierfernandes/following{/other_user}","gists_url":"https://api.github.com/users/javierfernandes/gists{/gist_id}","starred_url":"https://api.github.com/users/javierfernandes/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/javierfernandes/subscriptions","organizations_url":"https://api.github.com/users/javierfernandes/orgs","repos_url":"https://api.github.com/users/javierfernandes/repos","events_url":"https://api.github.com/users/javierfernandes/events{/privacy}","received_events_url":"https://api.github.com/users/javierfernandes/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/uqbar-project/wollok/labels/wollokgame","name":"wollokgame","color":"e11d21"}],"state":"open","locked":false,"assignee":null,"milestone":{"url":"https://api.github.com/repos/uqbar-project/wollok/milestones/4","html_url":"https://github.com/uqbar-project/wollok/milestones/Wollok%20v1.4%20Diderot","labels_url":"https://api.github.com/repos/uqbar-project/wollok/milestones/4/labels","id":1432576,"number":4,"title":"Wollok v1.4 Diderot","description":"Wollok Game","creator":{"login":"javierfernandes","id":4428120,"avatar_url":"https://avatars.githubusercontent.com/u/4428120?v=3","gravatar_id":"","url":"https://api.github.com/users/javierfernandes","html_url":"https://github.com/javierfernandes","followers_url":"https://api.github.com/users/javierfernandes/followers","following_url":"https://api.github.com/users/javierfernandes/following{/other_user}","gists_url":"https://api.github.com/users/javierfernandes/gists{/gist_id}","starred_url":"https://api.github.com/users/javierfernandes/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/javierfernandes/subscriptions","organizations_url":"https://api.github.com/users/javierfernandes/orgs","repos_url":"https://api.github.com/users/javierfernandes/repos","events_url":"https://api.github.com/users/javierfernandes/events{/privacy}","received_events_url":"https://api.github.com/users/javierfernandes/received_events","type":"User","site_admin":false},"open_issues":28,"closed_issues":1,"state":"open","created_at":"2015-11-27T15:15:02Z","updated_at":"2015-12-14T22:35:20Z","due_on":"2016-02-15T03:00:00Z","closed_at":null},"comments":3,"created_at":"2015-12-14T22:04:57Z","updated_at":"2015-12-15T13:24:34Z","closed_at":null,"body":"Currently there's only one way to make the character say something\r\n\r\n```xtend\r\nkeys.onPress(\"P\").characterSay [ \"Mensaje de prueba!\"]\r\n```\r\n\r\nBut for some games, I want to say something when for, example a character collides with another one.\r\nFore example for pacman, I want a bubble saying \"you lost\" when it hits a ghost"},"comment":{"url":"https://api.github.com/repos/uqbar-project/wollok/issues/comments/164763410","html_url":"https://github.com/uqbar-project/wollok/issues/488#issuecomment-164763410","issue_url":"https://api.github.com/repos/uqbar-project/wollok/issues/488","id":164763410,"user":{"login":"javierfernandes","id":4428120,"avatar_url":"https://avatars.githubusercontent.com/u/4428120?v=3","gravatar_id":"","url":"https://api.github.com/users/javierfernandes","html_url":"https://github.com/javierfernandes","followers_url":"https://api.github.com/users/javierfernandes/followers","following_url":"https://api.github.com/users/javierfernandes/following{/other_user}","gists_url":"https://api.github.com/users/javierfernandes/gists{/gist_id}","starred_url":"https://api.github.com/users/javierfernandes/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/javierfernandes/subscriptions","organizations_url":"https://api.github.com/users/javierfernandes/orgs","repos_url":"https://api.github.com/users/javierfernandes/repos","events_url":"https://api.github.com/users/javierfernandes/events{/privacy}","received_events_url":"https://api.github.com/users/javierfernandes/received_events","type":"User","site_admin":false},"created_at":"2015-12-15T13:24:34Z","updated_at":"2015-12-15T13:24:34Z","body":"Well the thing is that the piece of code will be kind of buried in my domain.\r\nCheckout  https://github.com/javierfernandes/wollok-wakman/blob/master/src/wacman.wlk\r\n\r\nI have a whenCollide call to wgame, but to get to the point where I need to say something, it goes through a series of callbacks (double dispatch). So having the \"say\" function at the whenCollide level, will  make it harder.\r\n\r\nI think for the moment we can just add it as a method on a place which is accesible from anywhere.\r\nSo two options (where \"this\" is a character)\r\n* wgame.say(this, \"hello\")    \r\n* posicion.say(this, \"hello\")    // even better, would be to avoid the this here if the position has state and knows the character. But well"}}