This forum is read only and just serves as an archive. If you have any questions, please post them on

1 decade ago by delly

Hi guys,

- I just realized that loadLevel is not resetting collisionMap to the original saved version (from weltmeister).

- This happens when i manually setting my collision map using collisionMap.setTile

to repro this behaviour, i put a small project here :

- Z/X to change between level A & B
- C to set a square collision right in the middle of the room.

I expect that when you loadLevel, it will reset everything including the collisionMap ?
any thought about this ?

Thanks in advance.

1 decade ago by dominic

When the ig.CollisionMap is instantiated in .loadLevel() it is handed the data directly from the Level object. It's just a reference, not a copy.

So if you intend to change the data of your instantiated maps, but don't want to change the original map data in your Level object, you can create a copy first:
this.loadLevel( ig.copy(LevelRoomA) );
Page 1 of 1
« first « previous next › last »