• Content Count

  • Joined

  • Last visited

  1. Coast2Coast

    Making Audio Sprites

    OMG! audiosprite is amazing! builds the json perfectly! WINDOWS Tips After install via npm audiosprite -g, ...set path new environment variable /to/ffmpeg/bin Next you can test via CMD (Win + r) and type ffmpeg It's done!, now you can use autosprite to join files and generate perfect json
  2. Hi is there a way to know posion of pixelperfect onto a grid? I am trying to randomize xy position of some pieces, but don't want to overlap over few zones occupeb by pixelperfect region I'm making jigsaws, loading different shapes, that's why the region to be built is always different. and I want, or trying to randomize the positions when starting the game, but how can I put these pieces all around the background shape . Any idea?
  3. Coast2Coast

    Checking distance between player and enemy

    also you can take a look to the method distanceToXY or distanceBetween (
  4. Wow! I'm seeing there's no possible to draw a group as it. Maybe dragging a sprite or something and use de update to move others Here are a challenge! I think my huge doubt is how to drag a group?
  5. Hi, How is the correct form to enable a graphic draw? Here is my code: // create fn :; // posicion del grupo en el escenario: var _y = 0; var _G =; for(var i=0;i<20;i++){ var p = this.doSome(i); // trying to create graphics inside a group or sprite ??? if(i>0){ p.x = (50*(i%5)); p.y = _y; } if(i%5==4){ _y = _y+50; } // p.enableBody = true; // p.inputEnabled = true; // p.input.enableDrag(false, true); _G.add(p); // console.log(p); } _G.setAll('inputEnabled',true); _G.callAll('input.enableDrag','input'); // ,parameter _G.x = (*0.5) - (_G.width*0.75); _G.y = (*0.5) - (_G.height*0.75); // = rect; }, // end create doSome: function(num){ var rect =,100); rect.beginFill(0xFF3300); rect.lineStyle(3,0xFFCC33,1); rect.drawRect(-25,-25,50,50); rect.endFill(); var txt =,0,null,{align:'center'}); txt.anchor.setTo(0.5,0.5); txt.x = rect.x; txt.y = rect.y; txt.text = num+1; var gp_ =; gp_.add(rect); gp_.add(txt); = 'gpo'+num; // gp_.inputEnabled = true; // gp_.mousedown(this.clickable,this); // gp_.inputEnabled = true; // gp_.input.enableDrag(false, true); // console.log(,num); return gp_; }, Console sends and error when I am using inputEnabled, and it says p.input is undefined Need some help I'm very beginner with phaser, and don't know clearly how do nested objects work This is what I want to do: - Create a group and move all together - Inside it create two elements: graphic.drawRect, and over it create a text, - I want to drag both elements at same time, so I put them into another group!, or how is it? Well, If somebody have an idea I would be glad! thanks