micouy Posted August 11, 2016 Share Posted August 11, 2016 Hi, I'm new to Phaser. I want to create a group named group, add sprites or tileSprites and set their parameters, such as tilePosition or scale. When I do it, nothing changes and console says "group.setALL is not a function". What am I doing wrong? (Shortened code below) group = game.add.group(); sprite1 = game.add.sprite(100, 100, 'zaba'); group.add(sprite1); group.setALL('scale.setTo', 2); Link to comment Share on other sites More sharing options...
tips4design Posted August 11, 2016 Share Posted August 11, 2016 It's setAll camel case. Link to comment Share on other sites More sharing options...
micouy Posted August 11, 2016 Author Share Posted August 11, 2016 Sorry, I don't understand. Could you tell me, what should I do, to change parameters of every sprite in group? Link to comment Share on other sites More sharing options...
3ddy Posted August 12, 2016 Share Posted August 12, 2016 He meant that you should change setALL to setAll in last line of posted code It should be group.setAll('scale.setTo', 2); Link to comment Share on other sites More sharing options...
micouy Posted August 12, 2016 Author Share Posted August 12, 2016 Oh, thanks, I'll try Link to comment Share on other sites More sharing options...
Recommended Posts