Replacing Tiles on collision

InFecTioN

  • Posts: 21
Basically, what I'm trying to do is replace tiles in the scene as the player-actor touches them. I can't seem to think of a way to do it though. Any thoughts or suggestions?

« Last Edit: June 22, 2011, 07:49:16 pm by InFecTioN »

Justin

  • *
  • Posts: 4716
How important is it that they're tiles? This would be possible either way, but it would be much more straightforward and simple if the "tiles" were actually actors.
For Live Support: Join our discord server and ping me @justin.
I'm most often available between 10am and 10pm Japan time. (GMT+9)

InFecTioN

  • Posts: 21
Well I have no problem using actors as tiles, I was just worried it would lag.

Justin

  • *
  • Posts: 4716
In that case, it would be pretty simple to give the tile actor a behavior which changes its animation when it collides with the player actor. Or give a behavior to the player, and you'd have to make sure that the player was colliding with the correct actor before changing the other actor's animation.

Remember to set the tile actor's collision group so that it doesn't collide with anything it doesn't need to (including itself, I'm assuming). If your performance isn't acceptable using actors, then it would take a bit more work, but you could also go with the original idea of using tiles.
For Live Support: Join our discord server and ping me @justin.
I'm most often available between 10am and 10pm Japan time. (GMT+9)