Author Topic: scrolling maps  (Read 974 times)

homemrobo

  • Member
  • **
  • Posts: 6
  • Karma: +0/-0
    • View Profile
scrolling maps
« on: Tue, Apr 26, 2011 »
Hi there, first post! I'm trying to get the logics behind a scrolling map. But I don't get it. Someone can explain how can I get my world moving in Y? Like in Knightmare (MSX).

I got this in a function that creates a tile map:

Code: [Select]
//create our wall tilemap
tmpMap = new FlxTilemap();
tmpMap.auto = FlxTilemap.AUTO;
tmpMap.loadMap(Rooms[_currentRoom].WallMap, FlxTilemap.ImgAuto, 8, 8);
tmpMap.collideIndex = 1;
arrWalls.push(tmpMap);
mapItems.push(lyrWalls.add(tmpMap) as FlxTilemap);


Some light would be great.



« Last Edit: Tue, Apr 26, 2011 by homemrobo »

Adam Atomic

  • Founder
  • Key Contributor
  • *****
  • Posts: 852
  • Karma: +0/-0
  • new dad
    • View Profile
    • Adam Atomic
Re: scrolling maps
« Reply #1 on: Tue, Apr 26, 2011 »
You will want to check out FlxG.follow (v2.35) or FlxG.camera.follow (v2.50) I think!