Hi, newbie here!
I'm trying to code a part of the game where the player cannot go through the walls. However instead of individually coding to check if the player has collided with ONE wall, I want it to check if the player is colliding with ALL the walls(sprites) in the array.
So for example, this is what my code currently looks like:
if GetSpriteCollision(wall1,Player) or GetSpriteCollision(wall2,Player) or GetSpriteCollision(wall3,Player) ........................
//Collision code goes here!
endif
This is my attempt at trying to include ALL sprites in the array I created:
if GetSpriteCollision(sprites[101] to sprites[110],Player)
//Collision code goes here!
endif
Now, of course the code including the array doesn't work. It works if I only include ONE sprite in the array, but I want it to include ALL of the sprites in the array.
Hope what I've written here makes sense.... I've been trying to work this problem out believe it or not for hours! I'm gonna sleep now. Any help is appreciated! Thanks.