0 Favourites

Tilemap object changing in-game?

  • I have Tilemap object working in-game no problem.

    Love it's functions.

    BUT...

    Is it possible to have the tilemap object change the sprite it uses while keeping all the tiles positions/types the same?

    At the moment it is an alien planet, but I'd like it that sometimes when player spawns its a desert wasteland... but the tiles positions are the same.

    Hope I'm making sense.

    If it cannot be done, is there any suggestions for changing the tilemaps image that doesn't include webgl effects?

    Thanks,

  • Construct 3

    Buy Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Buy Now Construct 3 users don't see these ads
  • You can't change Tilemap image on runtime.

    What you can do is to make few Tilemaps with different textures and just swap them - they should be exactly the same but with different look/style.

    For example if Tilemap1 have tiles:

    0 - alien sand

    1- alien grass

    2- alien rock

    then Tilemap2 must have:

    0 - desert sand

    1 - desert grass

    2 - desert rock

    So if you swap them they will have same id's on screen but with different image.

    Other thing you could do is to make one tilemap with all graphics. Let say tiles id 0 - 16 would be alien planet, and tiles id 20-36 - desert.

    Then if you will need to swat texture you need only add 20 to every tile id.

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)
Similar Topics Posts Views Last Post
Unread hot topic Locked topic
195 16,197
Ashley's avatar
Ashley Construct Team Founder
Unread hot topic
105 16,947
Magistross's avatar
Magistross
Unread hot topic
167 14,491
DMT2005's avatar
DMT2005