On my right sensor sprite i have
[]if <touching barrier>
[set righttest to 1]
[]else
[set righttest to 0]
Then on my hero i have,
[]forever
[][]if <<key right arrow pressed?> and <righttest = 0>>
[][][point in direction 90
switch to costume right b
change x by 8
wait 0.1 sec
switch to costume right a
change x by 8
wait 0.1 sec]
end if]
endforever]
Barrier is the name of a sprite i have that has different costumes. each costume is barriers for different levels.
Offline
Oh harakou, thanks for responding! but how can i fix this problem?
and it works if i put "black touching orange" instead of "touching barriers"
Im thinking it has something to do with the custom centers...
(i cant leave it like "black touching orange" because barriers is not always orange)
Offline
That's odd. I doubt it has anything to do with the centers. Actually, I seem to recall this being a weird bug with Scratch; color sensing works in cases where sprite contact sensing just skips right over. Let me check though.
Edit: It seems that both skip over, so I'm not sure what the problem is in this case. Would you be able to upload your unfinished project so I (or anyone else willing to help) could take a look?
Last edited by Harakou (2011-01-25 18:44:44)
Offline
Sure, but i think i figured out a way to make it work.
Im making 4 sprites, one for each direction that line up with things i dont want the hero to go through.
For example, when the right sensor sprite touches the right sensor walls, it'll set the variable to 1 and make stuff work. Ill upload it when i have all the sides up, because its still skipping over. I probably have to make the lines thicker...
Offline
Make one sprite, up down left right all different colors.
set ghost to 99.999
then don't do "when sprite touching..."
do "when color touching ..."
and make neon colors or something not used in your game.
Offline
I started my project over with brand new programming because i diddnt like the way it was coming out. It is now a scroller, and i think when i finish it will be the first scroller rpg ever made in scratch
Offline