I mean with out having to go back to another sprite. For example my brother need help for his zombies game and had black borders around but he wanted it so you can't pass through them, I want to know this for other games so please don't just teach me how on to do this on the zombie game
Offline
Way I did it is for the sprite to check if it's touching color black (border color) then I'd move the sprite back to where it came from. You can take a look at: http://scratch.mit.edu/projects/parent2nj/3195343
The tricky part was the sprite could get stuck on the wall. So, I had to detect if the sides were touching the wall and then move the sprite away. Take a look at the thread I started entitled "Stuck on wall" for the discussion.
Hope this helps!
Offline
Hi there! There are a few ways you can do this. The first is by sensing the border color.
when gf clicked forever if (touching color [border color] ?) go to [Start position]The second is to do it by sensing the border sprite
when gf clicked forever if (touching [Border v] ?) go to [Start position]You could also instead use broadcasts:
when gf clicked forever if (touching color [border color] ?) broadcast [Touching Border v]
when gf clicked forever if (touching [Border v] ?) broadcast [Touching Border v]And then tell the moving sprite that when it receives the message it needs to stop the scripts that allow it to move.
Offline
I made some tutorials for this on my help account! Here ya go: http://scratch.mit.edu/projects/7734f_help/3208892 and http://scratch.mit.edu/projects/7734f_help/3208907
Offline