I'm so sorry Gmoney! I've made a mistake! I wasn't very clear to begin with, my fault. So I'm making a retro pixel art game and the environments are made mostly entirely from tilemaps. I forgot the mention that and I thought that the code we'd brainstorm on here would probably be applicable as "On collision with Tilemap" somehow. Obviously, that's not the case here and would need entirely different code taking into account the tilemap . Sorry for your trouble <img src="{SMILIES_PATH}/icon_redface.gif" alt=":oops:" title="Embarrassed">!
I guess I would need some sort of code that says Creature:On Collision with Tilemap and specifically checks if it's hitting the "side" of an individual tile on the tilemap? Is that something that's possible to do? I think I need to use some sort of bounding box expression to check if the player collides with side wall, yes? I just had a thought but I'm not sure if it'll work. Need to actually try it. I can give the creature an 8 way direction behavior(or platform behavior) and when the creature is left or right from a wall, mirror the animation?
Oh, no problem at all, heyguy. <img src="{SMILIES_PATH}/icon_mrgreen.gif" alt=":mrgreen:" title="Mr. Green">
Tilemap can be solid, so it won't be a problem using this code.
I tested it with a tilemap based wall, and it seems to be working.
But occasionally the bullet's bounce pattern broke and the object seemed to have bounced around with a mind of its own. <img src="{SMILIES_PATH}/icon_e_confused.gif" alt=":?" title="Confused">
https://www.dropbox.com/s/x5rktv3kkbt4h ... .capx?dl=0
I guess I would need some sort of code that says Creature:On Collision with Tilemap and specifically checks if it's hitting the "side" of an individual tile on the tilemap? Is that something that's possible to do? I think I need to use some sort of bounding box expression to check if the player collides with side wall, yes?
Yes, that's possible 100%.
Please look into the capx file I made above. The file has two tilemaps; Tilemap and Tilemap2.
Notice the bounce is only affecting Tilemap2 as per events, meaning the ceiling and the floor can have Tilemap1 with a solid behavior.
The objects will still bounce, but they'll only turn their faces around when they're hitting the side walls (Tilemap2).
I can give the creature an 8 way direction behavior(or platform behavior) and when the creature is left or right from a wall, mirror the animation?
I'll experiment with that as well, because bullet's unpredictable bounce is randomly breaking the bounce patterns.