• Content Count

  • Joined

  • Last visited

About Stephen304

  • Rank
  • Birthday 04/02/1995

Profile Information

  • Gender
  1. Stephen304

    Multiple Tilemaps

    Is it possible to load in 2 tilemaps? The idea I have is to load the main one and then the next one with an x offset but I haven't been able to get it to work (nothing happens or the second one isn't visible). I tried: layer = game.add.tilemapLayer(0, 0, winW, winH, tileset, map, 0);layer2 = game.add.tilemapLayer(80, 0, winW, winH, tileset, map, 0);Because the test map is 80 blocks wide, but the second layer doesn't show up.
  2. Stephen304

    center align a group

    Thanks I didn't see the width property. It works great!
  3. Stephen304

    center align a group

    Is there a solution for 1 sprite? I need nametags for players and I can't have the nametags left aligned with the player sprite and the names can be any length.
  4. Stephen304

    Multiple Tilemaps

    We have a terrain generator that generates csv tilemaps that we need to load side by side so the player can walk continuously from one to the other infinitely. Is there an easy way to do this in 1.1.3 or are there any useful features of 1.1.4 that would help?
  5. Stephen304

    Can't set x/y of sprites, only velocity

    Thanks, that works!
  6. So I have a sprite for the player basically the same way as tutorials: player = game.add.sprite(32, - 150, 'man'); player.body.bounce.y = 0; player.body.gravity.y = 6; player.body.collideWorldBounds = true;And I know I can set velocity withplayer.body.velocity.x = 150;But how can I teleport the player? I have tried: player.body.x = 50;But it seems to get reverted back instantly to the original coordinate.
  7. Stephen304

    Can I ID sprites of a group to be referenced?

    Alright thanks!
  8. Stephen304

    Making isometric games

    I feel like the general idea is to make your map tiles and then alter rendering to rotate it 45 degrees and squash it.
  9. I have a group of sprites and I am trying to find a way to ID them to be referenced (to change velocity for instance). I can't just make individual sprites because that would hard code the number of sprites which needs to be dynamic. Is there a way of doing something like: snakes =;snakes.create(400, 400, 'snake1', 'snakeImage');snakes.create(400, 400, 'snake2', 'snakeImage');snakes.create(400, 400, 'snake3', 'snakeImage');snakes.create(400, 400, 'snake4', 'snakeImage');Then: snakes['snake3'].body.velocity.x = 150;Or something of that effect? I am considering making an object like this: var snakes = {};snakes['andrew'] = game.add.sprite(400, 400, 'snakeImage');snakes['lucy'] = game.add.sprite(400, 400, 'snakeImage');snakes['bob'] = game.add.sprite(400, 400, 'snakeImage');snakes['batman'] = game.add.sprite(400, 400, 'snakeImage');And: snakes['batman'].body.velocity.y = -9000;Is there a better way to do this?