Welcome to the Treehouse Community
Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.
Looking to learn something new?
Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.Start your free trial
Bozena Jablonski4,944 Points
My platforms fly off when the player touches them!
By adding the extra coins and platforms I must've messed something up because now the platforms fly off when I touch them. It clearly says 'body.immovable', and I don't think I've edited that part at all.
Any help would be much appreciated, thanks!
Steven Parker228,991 Points
It looks like you managed to discover something that could be used for some very interesting future games or modifications!
But you had the right idea about calling "
platforms.setAll('body.immovable', true);", you just need to move that down to the end of the "addPlatforms" function so it is called after the platforms are created.
Ian Johnson2,749 Points
Oh man, this 'error' is so cool!
I know this is an old post, but you can sort of make a new mini game by placing platforms.setAll('body.immovable', true); at different points between the platform code and try get the coins before the platforms slide off/drop/raise up - depending on how you hit them.