Please help, it sounds basic but I want my sprite to not be able to go through walls on the background. The walls are black and I don't want the sprite to die or anything, I just want the sprite to be able to move in another direction as normal.
I have a way involving changing direction and moving 5 steps in the other way but the sprite can still penetrate the walls moving diagonally.
Thanks
Offline
when gf clicked forever if<key [up arrow v] pressed?> change y by (4) if<touching [#000000]?> change y by (-4) end end if<key [down arrow v] pressed?> change y by (-4) if<touching [#000000]?> change y by (4) end end if<key [right arrow v] pressed?> change x by (4) if<touching [#000000]?> change x by (-4) end end if<key [left arrow v] pressed?> change x by (-4) if<touching [#000000]?> change x by (4) end end
Offline
ftf841 wrote:
when gf clicked forever if <touching [wall v] ?> change x by [-4]
There is a little problem with that.
The wall is part of the background and not a sprite.
That script could work if the walls were turned into a sprite.
Offline
You need to make the wall thincker. On of my "Archery" games (see below), there is an occasional glitch that makes it go through the walls. I've got many suggestions saying that i need to make the wall thicker.
Offline
mythbusteranimator wrote:
You need to make the wall thincker. On of my "Archery" games (see below), there is an occasional glitch that makes it go through the walls. I've got many suggestions saying that i need to make the wall thicker.
Actually you can either make the wall thicker or the arrow longer, or simply decrease the speed of the arrow. I believe the glitch you're speaking of is caused by the arrow moving faster and it is long, so it skips over some pixels when it moves.
Offline