• Content Count

  • Joined

  • Last visited

  1. this works for the collision layer for arcade. collisionLayer.setCollisionByExclusion([-1]);
  2. this works in arcade. this.physics.add.collider(player, npcs, collide, null, this);
  3. I have also Tried converting to arcade, and I can't assign collision with the NPCs or the collision layer. let map = this.make.tilemap({key: 'map'}); let tileset = map.addTilesetImage('magecity'); let DynamicLayer = new Phaser.Tilemaps.StaticTilemapLayer(this, map, 0, tileset, 0, 0); player = this.physics.add.sprite( / 2, 556, 'player'); = "player"; playerGroup =; playerGroup.add(player);; npcs =; path1 = new Phaser.Curves.Path(20, 40); path1.lineTo(100, 40); balambStudent = this.add.follower(path1, 20, 40, 'balambStu');; npcs.add(balambStudent);, npcs);, DynamicLayer, null, null, this, true);
  4. So I am working on my just general knowledge of how phaser works, I have only done two tutorials. But I think I have a decent grasp on it so far. But I am running into a little problem, I am trying to use the Follower object, so that I don't have to create the vec2 and attach it, but I don't seem to understand the documentation or what it means by "If this Game Object is enabled for physics then this property will contain a reference to a Physics Body." I have scoured the docs for hours. I see how to 'enable' in arcade physics but I cannot find any reference to how with impact physics. I am able to create a body object, and assign it to the game object, as well as assign the the game object to the body, but they do not move in tandem. in fact the body does not move at all. P.S. This is not the only bug, when converting from matter.js to impact.js physics my logic on pausing player movement when the dialog modal broke. but one problem at a time.. P.P.S I know its not the best code //SHIVA path3 = new Phaser.Curves.Path(550, 450); path3.lineTo(450, 450); path3.lineTo(450, 505); path3.lineTo(550, 505); path3.lineTo(550, 450); path3.lineTo(450, 450); shiva = this.add.follower(path3, 550, 450, 'shiva'); //Phaser.GameObjects.BuildGameObject(this, Phaser.GameObjects.PathFollower) //, impact); shivaBody = this.impact.add.body(550, 450, 16, 12); //TRYING DIFFERENT WAS TO SET BODY //shivaBody.setOffset(550, 450, 16, 12); shiva.body = shivaBody; shivaBody.setGameObject(shiva); = "shiva"; shiva.setRotation(); shiva.depth = 30; //ALT WAY TO GET NAME // = "shiva"; shiva.setData(npc, true); shiva.setData("name", "shiva"); npcBodies[2] = shivaBody; npcs.add(shiva); shiva.startFollow({ ease: 'Linear', duration:6000, yoyo:true, repeat: -1, _delay: 200, delay: 100 }); P.P.P.S I also tried;; dialog_plugin.js game.js index.html city.json