• Content Count

  • Joined

  • Last visited

About balrog_

  • Rank

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

  1. so... How I know those indexes? and in map.objects is where I will change it to the name of the object layer I have? ex map.playerPos I have been doing it all like this tutorial and I don't have any problems: but when I saw this // And now we convert all of the Tiled objects with an ID of 34 into sprites within the coins group map.createFromObjects('Object Layer 1', 34, 'coin', 0, true, false, coins); I thought, wow that's less complicated and easier but couldn't make it work, any idea?
  2. yeah, I saw that, and I have no Idea how to apply that in my case, and unfortunately there is not much tutorials about it.
  3. Hello, thanks for your help, I did that and worked, I put "this" because I was modifying the code to make it work, and also I forgot to put "this.enemies.enable Body = true;". It let me modify the hitbox, give them gravity, and basic stuff... and also collide with the world, but it seems that it wont let me give them dynamic actions that requires to be updated. So that means that I have to look about that "extend phaser sprite" method. If you have any tips about that, would be greatly appreciated.
  4. I want to give them gravity, hitbox size, anchor position, animations... and also give them some AI. I tried a code from this post, as in the post says. = the name given to the object in Tiled, so every object that has zombie as his name will have this configs but it returns: Game.js:105 Uncaught TypeError: Cannot read property 'name' of undefined var enemies; this.enemies =;'objectsLayer', 81, 'zombie', 0, true, false, this.enemies); this.enemies.forEach(setupEnemies, this); ....... function setupEnemies(enemy){ if ( == 'zombie'){ //this.enemy.scale.setTo(0.6,0.6); this.enemy.animations.add('iddle', [ 0], 1, true);'iddle'); this.enemy.body.setSize(4, 14, 0, 1);; this.enemy.body.gravity.y = player_gravtyForce; } } },
  5. Hello, I'm new with phaser and I'm building a platform game. I'm using tiled to create my map, I created an object Layer to place the player and the same enemy in specific points of the map, I did the enemies with this: var enemies =;'objectsLayer', 81, 'zombie', 0, true, false, this.enemies); They are showing on the map correctly but I don't know how to give them gravity, change their hitbox, animations, etc. They are just sprites floating there with no life. I want to give an enemy all the configuration and then make it affect all the enemies, also put them in a group. If there is another way please tell me. I was using this tutorial sorry for my english.